Do you know?
[BOTH] Number systems and complements - part 1
- Fact 1 of 12๐ก
Binary uses only 0 and 1
Binary is base 2, so each digit is 0 or 1. Think of a light switch: on is 1, off is 0. Recall: What base is binary? Answer: 2
- Fact 2 of 12๐งฎ
Binary to decimal: use place values
Place values double: 1, 2, 4, 8, 16. So 1011 = 8 + 2 + 1 = 11. Recall: Decimal value of 1100? Answer: 12
- Fact 3 of 12โ
Decimal to binary: divide by 2
Divide by 2 and note each remainder. Read the remainders from bottom to top. So 13 becomes 1101. Recall: Binary of 13? Answer: 1101
- Fact 4 of 12๐ฆ
Octal is base 8
Octal uses digits 0 to 7. Each octal digit stands for exactly 3 binary bits. So octal 17 = decimal 15. Recall: Which digits does octal use? Answer: 0 to 7
- Fact 5 of 12๐
Octal to binary: 3 bits per digit
Replace each octal digit with 3 binary bits. Octal 25 becomes 010 101, which is 10101 in binary. Recall: Bits for each octal digit? Answer: 3
- Fact 6 of 12๐ฃ
Hexadecimal is base 16
Hex uses 0 to 9 and A to F, where A = 10 and F = 15. Hex is common in computing and in many exam questions. Recall: Decimal value of hex F? Answer: 15
- Fact 7 of 12๐
Hex to binary: 4 bits per digit
Each hex digit becomes exactly 4 binary bits. Hex 1F becomes 0001 1111, which is 31 in decimal. Recall: Binary of hex A? Answer: 1010
- Fact 8 of 12๐
Hex FF equals 255
FF means 15 ร 16 + 15 = 255. It is the largest value that fits in 8 bits, so it is a common exam number. Recall: Decimal value of hex FF? Answer: 255
- Fact 9 of 12๐๏ธ
Binary to hex: group in fours
Group binary digits in fours from the right, then convert each group. So 1010 1100 becomes AC. Recall: Hex for 1010 1100? Answer: AC
- Fact 10 of 12๐
1's complement: flip every bit
To get the 1's complement, change each 0 to 1 and each 1 to 0. For example, 0101 becomes 1010. Recall: 1's complement of 0101? Answer: 1010
- Fact 11 of 12โ
1's complement: 15 minus the number
For 4 bits, the 1's complement equals 15 minus the number, since 15 is 1111. So 5 gives 10, or 1010 in binary. Recall: 4-bit 1's complement of 5? Answer: 1010
- Fact 12 of 12๐ข
1's complement stores negative numbers
In 8-bit 1's complement form, -5 is the flipped bits of +5: 0000 0101 becomes 1111 1010. Some older computers used this method. Recall: 8-bit form of -5? Answer: 1111 1010
