Data Representation & Boolean Logic
⏱ ~3-min readAceMark GuideWhat this topic is really about
A floating-point number with limited mantissa bits cannot exactly represent all denary values, leading to rounding errors.. The value 0.1 has no finite binary fraction equivalent, so a limited mantissa must approximate it, introducing a rounding or representation error.
De Morgan's law simplifies the negation of a conjunction to the disjunction of negations.. De Morgan's law states that the negation of a conjunction equals the disjunction of the negations, so NOT(A AND B) becomes NOT A OR NOT B.
See the mechanism
The correct answer, 182, is obtained by adding the values of the set bits in the binary number 10110110, which are 128, 32, 16, 4, and 2. A diagram for this topic isn't available yet — the worked example below walks the same reasoning step by step.
An exam-style question, fully explained
What is the denary (decimal) value of the unsigned binary number 10110110?
- Identify what the question tests: What is the denary (decimal) value of the unsigned binary number 10110110.
- The set bits represent 128 + 32 + 16 + 4 + 2, which sum to 182.
- A value of 180 is a common miscalculation that omits the 2 from the least significant set bit.
- Why it matters: The correct answer, 182, is obtained by adding the values of the set bits in the binary number 10110110, which are 128, 32, 16, 4, and 2. This calculation is based on the positional notation of binary numbers, where each bit represents a power of 2. The common miscalculation of 180 occurs when the least significant set bit, representing 2, is overlooked.
Traps the examiner sets
- A common mistake is to forget to include the value of the least significant set bit, which can lead to an incorrect calculation. This mistake can be avoided by carefully checking each bit in the binary number and adding up the corresponding powers of 2.
- Don't confuse the unsigned interpretation with two's complement: ignoring the sign bit gives the wrong answer.
- The negation of A OR B is actually NOT A AND NOT B, not NOT A OR NOT B.
- The maximum value that can be represented is often mistakenly used as the total count of distinct values, but the count includes zero.
- Many students confuse rounding errors with overflow or underflow errors, but these are distinct concepts related to the range of values that can be represented, rather than the precision of representation. Rounding errors occur because some denary fractions cannot be exactly represented as binary fractions.
Test your recall
Answer each from memory — you'll see instantly whether you're right and why.
Run a focused 10-question mini-mock on Data Representation & Boolean Logic and see it stick.
Practice more of this topic →