Doing Binary In BASIC: Difference between revisions
From Bitchin100 DocGarden
Jump to navigationJump to search
(New page: When programming in assembly language, dealing with binary arithmetic is a straightforward affair. Your computer is designed in a deep way around binary numbers, operations, and arithmetic...) |
No edit summary |
||
Line 5: | Line 5: | ||
Dealing with binary is important in the following use cases: | Dealing with binary is important in the following use cases: | ||
* Determining if a number is even or odd | |||
* Packing 1-bit data together for space efficiency | |||
* Left shifts and right shifts on signed and unsigned data | |||
* Calculation complex conditional expressions without using IF | |||
* Signed and unsigned integer arithmetic | |||
* Masking bits | |||
Although the manuals may document effectively what each of the logical operators do, it does not | Although the manuals may document effectively what each of the logical operators do, it does not | ||
(TO BE COMPLETED) | (TO BE COMPLETED) |
Revision as of 14:14, 11 January 2009
When programming in assembly language, dealing with binary arithmetic is a straightforward affair. Your computer is designed in a deep way around binary numbers, operations, and arithmetic.
But layer a programming language like BASIC on top of it, and there are significant hurdles to dealing in binary.
Dealing with binary is important in the following use cases:
- Determining if a number is even or odd
- Packing 1-bit data together for space efficiency
- Left shifts and right shifts on signed and unsigned data
- Calculation complex conditional expressions without using IF
- Signed and unsigned integer arithmetic
- Masking bits
Although the manuals may document effectively what each of the logical operators do, it does not
(TO BE COMPLETED)