3.1.2 · D1Boolean Algebra & Logic Gates

Foundations — Hexadecimal and octal representation

2,126 words10 min readBack to topic

This page assumes you know nothing. Every symbol the parent note topic leans on — , , , the subscript, the summation sign — is built here from the ground up, in an order where each idea rests on the one before it.


1. Counting marks: what "a number" secretly is

Look at the figure. On the left, seven sheep drawn as seven scratches. On the right, the same seven written as a single symbol 7. The number didn't change — only how compactly we wrote it. Hex and octal are exactly this move applied to binary.


2. A digit — the atom of a written number

We'll write digits with the letter . When there are several, we tell them apart with a small number written low and to the right: , , . That low-right number is called a subscript, and it is just a name-tag, not a multiplication.


3. The base — how many different digits exist

The figure shows three counting wheels side by side. The binary wheel () has just two notches — it rolls over almost immediately. The octal wheel has eight notches. The hex wheel has sixteen. The bigger the base, the more counting you do before rolling over, which is exactly why bigger bases pack more information per box.


4. Place value — why where a box sits matters

The staircase in the figure shows place values for base : the rightmost box is , then , then , each step times taller. The rightmost box is called the least significant (smallest multiplier); the leftmost is most significant. This "smallest on the right" fact is the reason the parent note keeps insisting you group bits from the right — the powers grow that way.


5. The summation sign — add up all the boxes

Now we can say what a number's total value is: add up every (digit its place value). Written box by box for a 3-box number:

For long numbers that "" gets tiring, so mathematicians shorthand it with the Greek capital sigma, ("sum of"):


6. Hex's extra symbols — where A–F come from


7. Powers of two — the hidden reason the whole trick works

The figure shows the same 8-bit row 11010110 cut two ways: into 4-bit chunks (each becomes one hex box) and into 3-bit chunks (each becomes one octal box). Notice both cuts start from the right edge — that's the least-significant side from §4.


8. Notation you'll meet: subscripts, 0x, 0o, 0b


How these foundations feed the topic

Digit - one symbol in a box

Base b - how many digit symbols

Digit range 0 to b minus 1

Place value - powers of b

Exponent b to the i

Summation - add digit times place

Hex letters A to F

8 equals 2 cubed and 16 equals 2 to 4

Base tags - subscript 0x 0o 0b

Hex and Octal representation

Read it top to bottom: a digit needs a base, the base fixes the digit range and the base tags; exponents build place values, which the summation adds into a total; the digit range forces the letters A–F; and the fact that and are powers of two is what turns all of this into the grouping shortcut that is the topic.


Equipment checklist

Cover the right side and test yourself. If any line is shaky, re-read its section before tackling the parent note.

What does a subscript like the in mean — multiply or label?
A label ("digit number zero"), never a multiplication.
What is the base (radix) of a number system?
The count of distinct digit symbols; legal digits run to .
What is the largest legal digit in base ?
(so in binary, in octal, in hex).
What does "" equal in base ?
The base itself: , , .
What does the exponent in tell you to do?
Multiply by itself times; and .
In base , what are the place values from right to left?
— powers of growing leftward.
Which side holds the smallest place value, left or right?
The right (least significant is rightmost).
What does compute?
A number's total value: each digit times its place value, all added.
What decimal values do hex through stand for?
.
Why do and make good binary shorthands but does not?
and are powers of two, so bits group cleanly; is not.
What do the prefixes 0b, 0o, 0x mark?
Binary, octal, and hexadecimal literals respectively.

Connections

  • Positional number systems and place value — the general framework this page unpacks digit by digit.
  • Binary number system — the base that hex and octal abbreviate.
  • Boolean Algebra & Logic Gates — the parent chapter these foundations serve.
  • Bitwise operations — where grouped bits become useful.
  • Two's complement and signed numbers — usually displayed using these base tags.
  • Memory addresses and byte addressing — addresses shown in hex.