Doing Binary In BASIC: Difference between revisions
From Bitchin100 DocGarden
Jump to navigationJump to search
No edit summary |
No edit summary |
||
Line 15: | Line 15: | ||
(TO BE COMPLETED) | (TO BE COMPLETED) | ||
[[Category:Model T Developer Reference]] |
Latest revision as of 23:03, 30 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)