PHY 452 · Electronics
Number systems and codes
Binary, octal and hexadecimal, conversions, signed numbers and two's complement, BCD, Gray and ASCII codes.
PHY 452 · Electronics
Digital circuits work with signals of two levels: 1 (HIGH, true) and 0 (LOW, false). In 5 V TTL logic, HIGH is about 2 to 5 V and LOW about 0 to 0.8 V. Two levels are easy to tell apart, so digital signals resist noise.
| Decimal | Binary | Octal | Hexadecimal |
|---|---|---|---|
| 0 | 0000 | 0 | 0 |
| 5 | 0101 | 5 | 5 |
| 9 | 1001 | 11 | 9 |
| 10 | 1010 | 12 | A |
| 15 | 1111 | 17 | F |
| 16 | 10000 | 20 | 10 |
0 + 0 = 0, 0 + 1 = 1, 1 + 1 = 10 (0 carry 1), 1 + 1 + 1 = 11. Subtraction A - B is A + (two's complement of B), ignoring the final carry.
Reading BCD as ordinary binary. 0101 1001 in BCD is 59, but as a binary number it is 89.
Written by the UniHive team in our own words. Spotted a mistake? Tell us on WhatsApp.
Our team adds free books, videos and practice for each topic, and opens every link before it goes up.