Binary Numbers
Master 8-bit integers, Hexadecimal conversions, Binary Addition, and Bit Shifts.
Think of it like: Light Switches
Computers don't actually understand "Numbers". They run on electricity.
- 1 = Switch is ON (Electricity flows).
- 0 = Switch is OFF (No electricity).
A "Bit" is just one single switch.
The Byte Explorer
Click bits to toggle them (0/1). See the Denary and Hex value.
Terminology: MSB (Most Significant Bit) is the leftmost bit with the highest value. LSB (Least Significant Bit) is the rightmost bit with the lowest value.
Note: Right shifting an odd number (ending in 1 at the LSB) causes loss of precision as the bit 'falls off'.
Binary Adder
Simulate adding two 8-bit numbers. Watch for Overflow!
Check Your Understanding
1. What does logically shifting a binary number one place to the Left mathematically do?
2. Why does shifting the binary number 00000101 ONE place to the right result in a loss of precision?
3. What is the maximum value that can be represented by an 8-bit unsigned binary number?
Evaluation Exam Scenario (AO3)
The Examiner's Eye
A classic trap! Students frequently claim that Hexadecimal "takes up less memory" or "compresses data". This is mathematically FALSE. Both Hex and Binary are just representations. Hex 0xFF and Binary 11111111 both consume exactly 1 byte. Hex is purely for humans to read easily.
"A software developer decides to store all of the UI's colour codes in Hexadecimal format (e.g. #FFC000) rather than standard 8-bit Binary. State two reasons why the developer would choose Hexadecimal, and state one thing it does NOT do." (3 marks)
Reason 1 (Readability): Hexadecimal is much easier for the human programmer to read and remember than long, 24-bit binary strings (e.g. #FFC000 vs 111111111100000000000000).
Reason 2 (Accuracy): Because it is shorter on the screen, humans are much less likely to make an error when typing or transcribing the values.
What it doesn't do (The Trap): It does not save memory, use less storage space, or run any faster in the computer.