Loading...
An unsigned eight-bit integer uses weights 128, 64, 32, 16, 8, 4, 2 and 1. Add the weights where bits are one to obtain denary. Hexadecimal uses sixteen symbols, 0–9 and A–F; each digit corresponds to four binary bits. Keep leading zeros when a fixed-width answer is required. A binary pattern has no inherent meaning without an encoding: the same bits could be an integer, character or image component.
Video by Craig'n'Dave. The video’s own board label is retained; follow the specification reference and scope notes on this lesson for assessed content.
Viewing focus: Convert between denary, binary and hexadecimal
After watching, attempt these questions before opening the answers. You can also use the written lesson below.
After watching 1: What is hexadecimal F in denary?
15. Hex digits run from zero to fifteen.
After watching 2: What is the largest unsigned eight-bit value?
255. There are 256 values including zero.
What you'll be able to do
An unsigned eight-bit integer uses weights 128, 64, 32, 16, 8, 4, 2 and 1. Add the weights where bits are one to obtain denary. Hexadecimal uses sixteen symbols, 0–9 and A–F; each digit corresponds to four binary bits. Keep leading zeros when a fixed-width answer is required. A binary pattern has no inherent meaning without an encoding: the same bits could be an integer, character or image component.
Binary addition follows place value, with a carry when a column totals two or more. An unsigned eight-bit result can represent only 0–255. If the true result exceeds that range, a carry beyond the eighth bit indicates overflow; a wrapped stored pattern is not the correct mathematical sum. Signed representations use a different range and overflow interpretation, so use the representation actually specified.
A left shift appends zeros on the right and discards high bits in a fixed-width word. It multiplies an unsigned integer by two only if no significant bit is lost. An unsigned logical right shift inserts zeros on the left and divides by two with any fractional part discarded. Distinguish a logical shift from a signed arithmetic shift. In an answer, state width and show the resulting pattern before describing the numerical effect.
Attempt these problems on paper before opening the worked reasoning. Explain your steps as well as giving a final answer.
Common mistakes to avoid
Key takeaways
Question 1: Shift unsigned eight-bit 10000000 left once. What happens?
Overflow loses the true result 256; the stored value is 0.
Check the assessed scope and practical or mathematical requirements.
An external explanation or interactive activity to use alongside the lesson. It may include extension material.
Close the notes and answer from memory. Revisit any explanation you cannot yet reconstruct.
Test yourself
Answer a few questions, then review anything you missed.
Start with the quiz above to check the key ideas. You can also choose another topic from the practice library.