Digital Design · Binary place values
#02 Digital Design #02 | Binary, Hex and Signed Numbers
Corrected solution notes. The audio is the original recording and may contain errors or incomplete phrases. Where they differ, use the corrected written solution.
Question

Corrected solution notes. The audio is the original recording and may contain errors or incomplete phrases. Where they differ, use the corrected written solution. Digital Design #02 | Binary, Hex and Signed Numbers
Written solution and narration transcript(shows the full solution)
Below are all the lines written in the notebook together with the full narration transcript.
1. Binary place values
Corrected solution notes. The audio is the original recording and may contain errors or incomplete phrases. Where they differ, use the corrected written solution.An unsigned eight-bit word has weights 128,64,32,16,8,4,2,1 from left to right.Add only the weights whose bits are one.Narration transcript
In the last lesson, voltage became a bit. Now we ask the next question: how do bits become numbers? Binary is a positional number system. That means each bit has a weight. The rightmost bit is worth one. The next is worth two, then four, eight, sixteen, and so on. So an eight bit byte is not just a row of switches. It is a row of weighted decisions. This is why the same simple alphabet, zero and one, can describe small counters, addresses, colors, machine instructions, and memory contents.
2. Read the first byte
10110101 represents 128+32+16+4+1=181 unsigned.Its signed eight-bit two's-complement value is 181−256=−75.Narration transcript
Let us read the byte one zero one one zero one zero one. Start from the weights: one twenty eight, sixty four, thirty two, sixteen, eight, four, two, and one. Only the positions that contain a one contribute to the value. So we take one twenty eight, add thirty two, add sixteen, add four, and add one. The result is one hundred eighty one in decimal. The useful habit is this: do not memorize a random binary string. Put weights under it, then add only the active weights.
3. Hexadecimal
Group 10110101 as 1011 and 0101. These nibbles are B and 5, so the same bits are written 0xB5.Changing notation does not change the bit pattern.Narration transcript
Binary is exact, but long binary strings are hard for humans to read. Hexadecimal is the engineering shortcut. One hex digit represents four bits, which we call a nibble. Group the byte into two nibbles: one zero one one, and zero one zero one. The first group is decimal eleven, so in hex it is B. The second group is five. Therefore the same byte can be written as B five in base sixteen, or zero x B five in programming notation. Nothing changed in the hardware; we only changed the way we write the pattern.
4. Correct signed example
The different byte 11111011 is 251 unsigned and −5 in eight-bit two's complement.Do not attach those values to the earlier 10110101 graphic. Width and encoding determine interpretation.Narration transcript
Now comes the important warning. A bit pattern does not carry its meaning alone. Meaning comes from the contract, or in software terms, from the data type. The pattern one one one one one zero one one can mean two hundred fifty one if we read it as unsigned. But in an eight bit signed two's complement system, the same pattern means negative five. Same bits, different promise. That is why digital design keeps asking: what does this pattern represent here?
5. Negate five
Positive five is 00000101. Invert all eight bits to 11111010; add one to obtain 11111011.The operation gives negation modulo 256. The signed value −128 cannot be negated within eight signed bits without overflow.Narration transcript
Here is the quick two's complement example. To represent positive five in eight bits, write zero zero zero zero zero one zero one. To make negative five, invert every bit: one one one one one zero one zero. Then add one, giving one one one one one zero one one. That is the eight bit two's complement representation of negative five. The beauty is that addition hardware can stay simple. The same adder can add positive and negative values, because the encoding was chosen to make arithmetic work.
6. Review

Corrected mathematical reference; use with the written derivation. Binary weights, hexadecimal grouping and signed interpretation answer different questions.A shared eight-bit adder performs arithmetic modulo 256; unsigned carry and signed overflow are different conditions.Narration transcript
So the second mental model is this. Binary gives every bit position a weight. Hexadecimal packs every four bits into one readable digit. Signed numbers add a contract on top of the bit pattern, so the same bits may mean a large positive value or a negative value. In the next lesson we will use those bits as logic inputs and build truth tables for the basic gates: NOT, AND, OR, NAND, and XOR.
Source video: Digital Design #02 | Binary, Hex and Signed Numbers (3:46)