Leading zeros and fixed-width binary
00000101 is the binary number 101 padded with leading zeros to fill 8 bits. Zeros added on the left do not change the value, so it is still 5.
Understanding Leading zeros and fixed-width binary in ACARA Digital Technologies Years 7–8
What it does: 11 in binary is 3. Two zeros on the left fill the 4 bits and the value stays 3. Pad 11 with two zeros on the left to get 0011, which is still 3. Writing 1100 would make it 12. Count every digit, including the leading zeros. 00001111 has 8 bits, made of two 4-bit groups (nibbles). The leading zeros add nothing, so 00000101 is the binary number 101. That equals 4 + 1 = 5, not one hundred and one. Put the extra zeros on the left: 00000110. Moving zeros to the right changes 110 into 192. The single leading zero fills the 4-bit group without changing the value of 110, which is 6.
Common mistakes: zfill(8) pads the binary number to 8 bits, so the length check should compare with 8, not 4. The format code needs the letter b to give binary. '08b' gives 00000101 (8 bits, padded with zeros). '08' would just give a decimal number.
Free printable worksheet with full answer key — or add this module to a class and your students practise it interactively.
This module's key terms are also in a printable crossword (Modules 189–203) and word search (Modules 189–236).
Take this worksheet further — free with Cloodit
Each concept is reinforced from every angle — learned, then applied, then tested.
Cloodit turns curriculum-aligned coding content into journeys students work through one biome at a time.
Over 100 of them, across seven natural biomes.
Turns their work into revision material ready for Flash Cards and Exam study.
Live, competitive practice for the start of the lesson or a teacher-led lesson finisher.
Honour your top performers, or encourage a student who's trying hard — ready to print in seconds.
Quick Questions
Match the Pairs
Key Term
00000101Fill in the Blanks
Spot the Error
Student with a class code? Join your class →