3 mistakes learners make with data representation, each one named and explained.
Everything is stored as binary, and the units and place values have fixed sizes.
A binary number is converted with the columns shifted, giving a power of two out.
The columns double rather than going up in tens, so a slip of one column changes the answer by a factor of two.
Question. What is 1010 in denary?
A common answer. 12
The answer. 10
Why. The columns are 8, 4, 2, 1. Ones sit in the 8 and the 2 columns, giving 8 + 2 = 10.
Always write 8 4 2 1 above the digits before converting.
A file size is out by a factor of eight, or kilo is treated as exactly a thousand where the question wants 1024.
The words sound alike and the factors are close enough that a wrong one still looks plausible.
Question. How many bits are in 2 bytes?
A common answer. 2
The answer. 16
Why. A byte is 8 bits, so 2 bytes is 16 bits. Bit and byte differ by a factor of eight throughout.
Write the factor of 8 down before calculating.
A price is stored as an integer, or an identifier that is never calculated with is stored as a number.
Types are chosen by what the value looks like rather than by what will be done with it.
Question. Which type suits a price like 4.99?
A common answer. Integer
The answer. Real or float
Why. Integers hold whole numbers only, so 4.99 would lose its pence. A value with a fractional part needs a real type.
Choose the type from what the value must be able to hold and do.
WAJD spots these patterns in your child's answers and names the one behind their wrong answers, instead of just marking them wrong.