English:Binary, hexadecimal and data capacity calculations - Computing Year 10
Introduction

Convert binary, decimal and hexadecimal with reversible checks; add and shift unsigned bit patterns; calculate bitmap, audio and embedded-recorder capacity with explicit units and assumptions. Work the required B6 and EA examples, then test changed inputs and explain overflow.
Convert binary decimal and hexadecimal representations
Read a representation before calculating
A number is a value; a numeral is one representation of that value. Binary uses place values that are powers of two, decimal powers of ten and hexadecimal powers of sixteen. State the base so that the text 10 is not ambiguous: it can mean decimal ten, binary two or hexadecimal sixteen. This course treats the bit patterns as unsigned non-negative integers unless another interpretation is explicitly declared.
An eight-bit unsigned value ranges from 0 to 255 because its eight places are 128,64,32,16,8,4,2,1. There are 256 distinct patterns, not a maximum value of 256. A leading zero preserves the width of the representation without changing the value. The same eight bits could represent part of a character or pixel in a different agreed format; bits do not identify their own meaning.
Work the mapped example in two directions
For 10110110 in base two, multiply each digit by its place value and add the non-zero contributions:
| Place value | Digit in 10110110 | Contribution |
|---|---|---|
| 128 | 1 | 128 |
| 64 | 0 | 0 |
| 32 | 1 | 32 |
| 16 | 1 | 16 |
| 8 | 0 | 0 |
| 4 | 1 | 4 |
| 2 | 1 | 2 |
| 1 | 0 | 0 |
The total is 128+32+16+4+2 = 182 in decimal. Group from the right into four-bit blocks: 1011 0110. The first block is eleven and is written B in hexadecimal; the second is six. The result is B6 in base sixteen. Check in the reverse direction: 11×16+6 = 182. A hexadecimal digit represents exactly four bits, so two hexadecimal digits can represent one byte.
| Binary block | Decimal value | Hexadecimal digit |
|---|---|---|
| 0000 | 0 | 0 |
| 0001 | 1 | 1 |
| 0010 | 2 | 2 |
| 0011 | 3 | 3 |
| 0100 | 4 | 4 |
| 0101 | 5 | 5 |
| 0110 | 6 | 6 |
| 0111 | 7 | 7 |
| 1000 | 8 | 8 |
| 1001 | 9 | 9 |
| 1010 | 10 | A |
| 1011 | 11 | B |
| 1100 | 12 | C |
| 1101 | 13 | D |
| 1110 | 14 | E |
| 1111 | 15 | F |
The letters A through F stand for ten through fifteen. F is one digit with value fifteen, not the decimal number fifty. Hexadecimal is a compact notation used for the same underlying values; converting a value to hexadecimal does not compress a file or change a memory chip’s capacity.
Convert a new value and verify it
Required transfer: convert 11101010 in base two to hexadecimal and decimal. From the right, the groups are 1110 and 1010, giving E and A. Therefore the hexadecimal representation is EA. The decimal sum is 128+64+32+8+2 = 234; independently, 14×16+10 = 234. Record both methods so that a mistaken digit can be located.
To convert decimal 45 into eight-bit binary, select the largest usable place 32, leaving 13; then select 8,4 and 1. The eight places give 00101101, or hexadecimal 2D. Check 2×16+13 = 45. Repeated division by two with remainders is another valid method: read the remainders from last to first and restore leading zeros only if the required width demands them.
Interpret the device illustration carefully
The Introduction illustration gives a historical desktop-computer context for capacity: memory holds working data and storage retains files. It is not a scale diagram of bits, proof of a current device specification or an instruction to open hardware. The original publisher’s video adds conceptual memory/input/output context. Its role is to connect representations with devices; the full calculation methods and checked answers are supplied here.
CodeAI / Code.org: CPU, Memory, Input & Output. Identify the role of memory and storage, then return to the place-value methods; this contextual video does not replace the binary calculation examples. Original: CodeAI, How Computers Work: CPU, Memory, Input & Output. The written explanations and native tasks work without sound or the external player. For a first 55-minute session, use five minutes for retrieval, ten for explanation, twelve for worked examples, ten for guided practice, thirteen for the changed-input transfer and five for evidence/reflection. Further exercises can be completed later. Year 10 is an editorial allocation within the mapped GCSE/KS4 pathway; the chosen awarding organisation’s current conventions still matter.
Add and logically shift fixed-width unsigned values
Add bits with a carry, not decimal digit rules
Binary addition uses 0+0=0, 0+1=1, 1+0=1 and 1+1=10 in base two. In the last case write zero in the current column and carry one to the next. If both input digits and the incoming carry are one, the column total is decimal three, written 11 in binary: write one and carry one. Work from the rightmost, least significant column to the left.
For 00101101 plus 00010111, the decimal check is 45+23 = 68. From right to left, the eight column outcomes are write 0 carry 1; write 0 carry 1; write 1 carry 1; write 0 carry 1; write 0 carry 1; write 0 carry 1; write 1 carry 0; write 0 carry 0. Reading the written digits in their normal left-to-right order gives 01000100. Its places 64+4 confirm 68. Do not read the right-to-left working list as the final numeral.
Distinguish a mathematical sum from an eight-bit stored result
Adding 11111010 and 00001010 means 250+10 = 260. The full binary sum needs nine bits: 100000100. A model restricted to eight unsigned bits retains 00000100 and reports an overflow carry. The retained value is four, not the correct unrestricted sum of 260. Merely dropping the carry without recording overflow hides information.
Overflow depends on representation and width. This lesson’s overflow rule is for eight-bit unsigned addition. It does not claim to detect signed two’s-complement overflow or describe every programming language’s integer behaviour. Python integers can grow, so the teaching function deliberately applies modulo 256 to model this particular fixed-width storage rule.
Trace logical shifts and the lost bits
A logical left shift moves every bit towards the most significant end, inserts zero at the right and discards bits that fall outside the stated width. With an unbounded unsigned integer, shifting left by one multiplies by two. In a fixed-width model this relationship holds numerically only when no significant bit is lost.
| Operation on eight bits | Stored result | Interpretation |
|---|---|---|
| 00101101 left by one | 01011010 | 45 becomes 90; no one bit is lost |
| 10110110 left by one | 01101100 | 182 doubled is 364; retained value is 108 after losing the leading one |
| 10110110 logical right by one | 01011011 | 182 becomes 91 |
| 00000101 logical right by one | 00000010 | 5 becomes 2; the low one bit is discarded |
| 10110110 left by eight | 00000000 | All original bits leave this eight-bit model |
A logical right shift inserts zeros at the left. For an unsigned value it takes the whole-number quotient on division by a power of two; a lost low bit can represent a remainder. Do not round 5/2 to three in the logical-right-shift example. Arithmetic right shift for signed numbers is a different operation and is outside this declared model.
Make each step testable
Use a trace with columns for input pattern, width, shift direction, shift count, bits lost, resulting pattern and decimal check. For addition include both the full sum and any retained result. A test with zero alone cannot demonstrate correct overflow handling; include 255+1, which produces full sum 256 and retained eight-bit zero with overflow true. Include 0+0 as a separate normal case.
Before checking a solution, try a hint: compare the low four-bit block with the hexadecimal digit, or add the decimal values and convert back. If a disagreement remains, find the first incorrect carry or lost bit. Do not alter the expected answer to match an implementation. Present the reasoning separately from the output of a calculator or the supplied program.
Calculate and test raw data capacity budgets
Calculate a raw data payload with declared units
A bit is one binary digit; a byte is eight bits. Use lowercase bit or b and uppercase B carefully. Here kB means 1,000 bytes and MB means 1,000,000 bytes; KiB means 1,024 bytes and MiB means 1,048,576 bytes. These binary-prefix and decimal-prefix units are distinct. If an examination question defines its own convention, state and use that convention rather than switching midway.
For an uncompressed bitmap payload with fixed bits per pixel, multiply width in pixels by height in pixels by colour depth in bits per pixel. The result is in bits. Divide by eight for bytes if the payload is an exact number of bytes; otherwise a tightly packed payload needs the next whole byte. Headers, palette tables, metadata, row padding, file-system allocation and compression are excluded unless separately specified.
Required worked example: 2,000×1,000 pixels at 24 bits per pixel gives 48,000,000 bits. Divide by eight to get 6,000,000 bytes = 6 MB under the decimal convention. This is approximately 5.722 MiB, not exactly 6 MiB. A stored image file need not be this size because its format may add overhead or apply compression. Doubling both dimensions at unchanged depth multiplies the raw pixel count by four.
Complete the required changed-input example
For 800×600 pixels at 16 bits per pixel, there are 480,000 pixels. Multiply by 16 to get 7,680,000 bits, then divide by eight to get 960,000 bytes. This is 960 kB or approximately 937.5 KiB. The figure is a raw payload before the specified exclusions, not a prediction of an actual compressed download.
For a simple uncompressed sampled-audio payload, multiply sample rate per channel by duration in seconds, bits per sample and the number of channels. At 44,100 samples per second per channel, 16 bits per sample, two channels and 10 seconds: 44,100×16×2×10 = 14,112,000 bits = 1,764,000 bytes. The sample rate is per channel here, so include the two channels once. No claim is made about the size of an MP3 stream with an independently chosen encoded bitrate.
Fit a capacity budget rather than guessing from a label
A fictional embedded recorder has 2,000,000 usable bytes after a separately reserved 200,000 bytes. At 1,000 samples per second, 16 bits per sample and one channel, raw audio uses 2,000 bytes per second. Exactly 1,000 complete seconds fit in the declared usable space. If the 2,000,000 figure instead described total capacity before the reserve, only 1,800,000 bytes would remain and 900 seconds would fit. Specify which input the question gives.
For 2,000,000 usable bytes and the 960,000-byte image payload, two complete images fit with 80,000 bytes remaining. Three do not fit. Real file overhead can reduce this result. Capacity is an amount; transfer rate is an amount per unit time. Neither alone proves the speed of a device, the suitability of its processor or safe operation of an embedded system. Other hardware/system-architecture topics are studied in their linked courses.
Execute a bounded checker and inspect its contract
The complete original Python 3 program below verifies eight-bit inputs, models the declared unsigned addition/left shift, and computes tightly packed raw bitmap payloads. It performs no network, account, hardware or file access. Dimensions are intentionally restricted for this teaching checker; it is not a complete image-file encoder.
def unsigned_byte(bits):
if type(bits) is not str or len(bits) != 8:
raise ValueError("Use exactly eight binary digits")
if any(digit not in "01" for digit in bits):
raise ValueError("Binary digits must be zero or one")
value = 0
for digit in bits:
value = value * 2 + int(digit)
return value
def add_bytes(left, right):
total = unsigned_byte(left) + unsigned_byte(right)
return format(total % 256, "08b"), total > 255
def logical_left(bits, places):
value = unsigned_byte(bits)
if type(places) is not int or places not in range(9):
raise ValueError("Shift count must be an integer from zero to eight")
return format((value * (2 ** places)) % 256, "08b")
def raw_bitmap(width, height, depth):
dimensions = (width, height, depth)
if any(type(v) is not int for v in dimensions):
raise ValueError("Dimensions and depth must be integers")
if width not in range(1, 10001) or height not in range(1, 10001):
raise ValueError("Dimensions must be from one to ten thousand")
if depth not in (1, 2, 4, 8, 16, 24, 32):
raise ValueError("Use a supported bits-per-pixel depth")
bits = width * height * depth
return bits, (bits + 7) // 8
if __name__ == "__main__":
for bits in ("10110110", "11101010"):
value = unsigned_byte(bits)
print(bits, value, format(value, "02X"))
print("Sum:", add_bytes("11111010", "00001010"))
print("Shift:", logical_left("10110110", 1))
print("Bitmap:", raw_bitmap(800, 600, 16))Expected output includes 10110110 182 B6 and 11101010 234 EA, sum pattern 00000100 with overflow True, shifted pattern 01101100 and Bitmap: (7680000, 960000). For a one-bit image of three by three pixels the payload is nine bits, so the program reports two bytes rather than silently rounding down. That assumes contiguous tight packing, not a format with a separate padded byte for each row.
Test all conversion values from 0 through 255, normal and overflowing addition, shift counts zero through eight, invalid digits and wrong types. For bitmap calculations test the worked dimensions, a non-byte-aligned payload and rejected zero/fractional dimensions. Keep expected and observed outcomes. A paper trace is useful reasoning, while practical programming evidence requires actual execution in an approved environment.
Interactive Tasks
Quiz: Test Your Knowledge
What decimal value does unsigned binary 10110110 represent? (182) (!186) (!118) (!256)
Which hexadecimal numeral matches binary 11101010? (EA) (!AE) (!E0) (!FA)
What range do eight unsigned bits represent? (0 through 255) (!1 through 256 only) (!0 through 256 inclusive) (!Only 0 and 1 as complete values)
What is 00101101 plus 00010111 in eight-bit binary? (01000100) (!01000000) (!00111100) (!10001000)
What happens when 250 and 10 are added in the stated eight-bit storage model? (Stored value 4 with unsigned overflow) (!Stored value 260 with no overflow in eight bits) (!Stored value 250 with no change) (!Every computer must stop working)
What is an eight-bit logical left shift of 10110110 by one? (01101100) (!01011011) (!11101100) (!10110110)
What is the raw payload for 800 by 600 pixels at 16 bits per pixel? (960000 bytes) (!7680000 bytes) (!480000 bytes) (!60000 bytes)
Which unit statement is correct under the stated conventions? (1 MiB is 1048576 bytes while 1 MB is 1000000 bytes) (!1 MiB and 1 MB are always identical) (!1 byte is 8 kilobits) (!1 MB is 1000 bits)
What must the stated stereo audio calculation include? (Sample rate per channel times bit depth times duration times two channels) (!Only duration and screen width) (!The two channels twice after they are already counted) (!The filename length instead of the sample count)
How many 960000-byte raw image payloads fit in 2000000 usable bytes? (Two with 80000 bytes remaining before any added overhead) (!Three with no overhead) (!Exactly one under all possible file formats) (!Four because binary has two digits)
Memory Game
| Binary | Base-two place-value representation |
| Hexadecimal | Base-sixteen notation with four bits per digit |
| Byte | A group of eight bits |
| Overflow | A fixed-width result cannot retain the complete unsigned sum |
| Colour depth | The stated number of bits allocated per pixel |
| Usable capacity | Space actually available after separately specified reserves |
Drag and Drop
| Convert a binary byte | Add place contributions and check with two hexadecimal digits |
| Check unsigned addition | Compare full sum with the declared retained width and carry |
| Trace a logical left shift | Insert low zeros and record any discarded high bits |
| Compute bitmap payload | Multiply pixel width by pixel height by bits per pixel |
| Compute sampled audio payload | Multiply rate per channel by bit depth by channels by seconds |
Crossword Puzzle
| BINARY | Which base uses digits zero and one? |
| HEXADECIMAL | Which base represents four bits per digit? |
| BYTE | What contains eight bits? |
| OVERFLOW | What occurs when a full result exceeds its retained width? |
| PIXEL | What picture element is counted in bitmap dimensions? |
| CAPACITY | What measures the amount of data space available? |
LearningApps
Optional extra practice. Choose an appropriate activity with your teacher. If the external collection is unavailable, use the native activities and independent tasks in this course.
Cloze Text
Open Tasks
Easy
- Label the eight binary places: Write 128 through 1 and convert 10110110 to 182.
- Explain hexadecimal digits: Write the sixteen digit values and explain B6 as 11 times 16 plus 6.
- Distinguish bit and byte: Explain why dividing bits by eight changes the unit without compressing data.
- Check the required transfer conversion: Show 1110 1010 becomes EA and verify decimal 234.
Standard
- Work a carry trace: Add 45 and 23 in eight-bit binary and show all carries.
- Explain fixed-width overflow: Compare full sum 260 with stored eight-bit value 4 and the overflow flag.
- Complete the image transfer: Show every unit in 800 times 600 times 16 and the conversion to 960000 bytes.
- Calculate stereo audio: Explain each factor giving 1764000 raw bytes for the stated ten-second example.
Advanced
- Evaluate a shift claim: Use 182 and 45 to show when an eight-bit left shift does and does not preserve doubling.
- Resolve an ambiguous memory budget: Compare total and usable capacity interpretations for the embedded recorder, giving 900 or 1000 seconds with assumptions.
- Test non-aligned pixels: Explain why a tightly packed three-by-three one-bit payload needs two bytes and why row padding could change a real file.
- Defend the evidence: Submit conversions, carry/shift traces, capacity budgets and actual valid/invalid checker results with a limitation.
Learning Check
- Required conversion transfer: Convert 11101010 to hexadecimal and decimal.
- Required bitmap transfer: Calculate the payload for 800 by 600 pixels at 16 bits per pixel.
- Addition and overflow: Compare the two worked sums.
- Logical shifts: Explain both left-shift examples and the odd right shift.
- Audio and embedded budget: Calculate the given stereo payload and recorder limit.
- Packing and limits: Explain the byte rounding and final evidence.
Worked checks and assessment guidance
- Group 1110 and 1010 to obtain EA. Its decimal value is 128+64+32+8+2 = 234; 14 times 16 plus 10 independently gives 234. The base and unsigned interpretation must be declared.
- 480000 pixels times 16 bits per pixel = 7680000 bits. Dividing by eight gives 960000 bytes, or 960 kB and 937.5 KiB under the stated conventions. Header, palette, padding, allocation and compression are excluded.
- 45+23 = 68, or 01000100 in eight bits. 250+10 = 260, whose full binary sum is 100000100. An eight-bit unsigned model retains 00000100 and reports overflow. Python needs the explicit modulo operation to imitate that fixed width; this is not signed overflow.
- 45 left by one fits and becomes 90. 182 left by one has full doubled value 364 but the eight-bit stored pattern 01101100 is 108 after losing a high one. A logical right shift of unsigned five by one gives two with the low one discarded, not rounded three.
- 44100 samples per second per channel times 16 bits times two channels times ten seconds = 14112000 bits = 1764000 bytes. Separately, the mono recorder uses 2000 bytes per second. Two million usable bytes allow 1000 seconds; two million total before a 200000-byte reserve allow 900 seconds.
- A tightly packed nine-bit payload requires the next whole byte, so two bytes. A row-padded real format may differ. Two 960000-byte payloads fit in two million usable bytes with 80000 remaining before additional overhead. Submit reproducible calculations, code and observed tests; neither a quiz nor raw arithmetic alone proves hardware suitability or practical competence.
Learning evidence
Keep the B6 and EA conversions in two directions, an eight-column carry trace, complete-versus-retained overflow result and logical-shift traces naming lost bits. Submit raw image/audio calculations with units and exclusions, the embedded-recorder budget with reserve interpretation, and complete source with actual valid/invalid tests if executed. Distinguish predictions, executed evidence and teacher-confirmed practical work.
OER and Wikipedia
DfE GCSE Computer Science subject content supplies the common mapped baseline; Year 10 sequencing is editorial. NIST: binary prefixes documents bit/byte and decimal/binary-prefix distinctions. Python built-in functions and Python standard types provide implementation background. Original traces, budgets, code, tasks and feedback were created and executed for this course. Reviewed 14 November 2026.
Personal computer, exploded.svg, Gustavb, CC BY 2.5. Unchanged original; caption and learning activities are original.
https://www.youtube.com/watch?v=DKGZlaPlVLY — CodeAI / Code.org: How Computers Work: CPU, Memory, Input & Output; unchanged original publisher embed.
Linked learning areas
aiMOOC Projects
Schulfach+


aiMOOCs


aiMOOC Projekte


MOOCwiki · Deutsch
Nach dem Lernen ist vor dem Lernen
Entdecke direkt den nächsten Lernkurs. Weitere Inhalte erscheinen, wenn Du weiter nach unten scrollst.
Zur MOOCwiki-HauptseiteMediathek
Mediathek wird aus dem Wiki geladen ...
Keine passenden Inhalte gefunden. Bitte ändere Suche oder Filter.
NEWSLernweltNOAH fragen