- What is the difference between a kibibyte and a kilobyte?
- A kibibyte is 1024 bytes and a kilobyte is 1000 bytes. Kibi is a binary prefix that counts in powers of 2, while kilo is a decimal prefix that counts in powers of 10. When you compare the two, name the value and the unit, because “bigger” or “smaller” earns nothing.
- How do you convert a hexadecimal number to denary?
- Multiply each digit by its place value and add the results. For three digits the place values are 256, 16 and 1, and A to F stand for 10 to 15. For example, A04 is (10 × 256) + (0 × 16) + 4, which gives 2564 in denary.
- How is Binary Coded Decimal (BCD) used to store a number?
- In BCD each denary digit is stored on its own as a four-bit group. For example, 108 is 0001 0000 1000 in BCD. Convert the digits one at a time, not the whole number. BCD is used in calculators, digital clocks and financial calculations where values must be exact.
- How do you find the two's complement of a negative binary number?
- Invert every bit, then add 1. For example, 45 is 00101101, which inverts to 11010010 and then becomes 11010011 as −45. Stopping after the inversion gives the one's complement instead. In 8 bits the most significant bit has place value −128, so the range is −128 to 127.
- How do you subtract binary numbers, and what is overflow?
- Convert the number being subtracted to its negative, using two's complement, and add it, showing the carries. Drop the carry out of the leftmost bit. Overflow happens when the answer is too long for the number of bits available, so it is larger than the maximum positive number or smaller than the most negative number that the register can store.
- What mistake do students make when they convert a denary number to BCD?
- They convert the whole number to unsigned binary instead of converting each digit to four bits. For 156, unsigned binary gives 10011100, which is not BCD. The correct BCD is 0001 0101 0110, one four-bit group for each of 1, 5 and 6.