6 bits · 1 byte
Signed (two’s complement)
42 = 0010 1010
Decimal → binary: divide by 2
| 42 ÷ 2 | = 21 | remainder 0 |
| 21 ÷ 2 | = 10 | remainder 1 |
| 10 ÷ 2 | = 5 | remainder 0 |
| 5 ÷ 2 | = 2 | remainder 1 |
| 2 ÷ 2 | = 1 | remainder 0 |
| 1 ÷ 2 | = 0 | remainder 1 |
Read the remainders from bottom to top: 101010
Binary → decimal: add the place values
13201618041201
32 + 8 + 2 = 42
Binary clock
Hours00000 = 00
Minutes000000 = 00
Seconds000000 = 00