A Level · 1.4.1 and 1.4.3
Data Types, Number Systems and Boolean Algebra
Name
Class
Date
Mark / 30
Section A
Circle the letter of the correct answer. One mark each.
- 1What is 11101100 in denary as an 8 bit two's complement number?1
- A-108
- B-20
- C20
- D236
- 2How do you negate a two's complement number?1
- AInvert every bit
- BAdd one then invert
- CInvert every bit then add one
- DShift left by one
- 3What is the range of an 8 bit two's complement number?1
- A-128 to 127
- B-127 to 128
- C0 to 255
- D-128 to 128
- 4In floating point, what does increasing the number of exponent bits do?1
- AIncreases both range and precision
- BHas no effect
- CIncreases precision only
- DIncreases the range but reduces precision for a fixed total
- 5What is the purpose of normalisation in floating point?1
- ATo make the number positive
- BTo reduce the exponent to zero
- CTo convert to fixed point
- DTo maximise precision by removing wasted leading duplicate bits
- 6Which is a correct statement of De Morgan's law?1
- A(A+B)' = A' + B'
- B(A.B)' = A' . B'
- C(A.B)' = A' + B'
- D(A.B)' = A + B
- 7Simplify A.B + A.B'1
- AA.B
- BA
- CA + B
- DB
- 8In a Karnaugh map, why should groups be as large as possible?1
- AIt makes the map easier to draw
- BA larger group eliminates more variables, giving a simpler expression
- CIt reduces the number of maps needed
- DSmall groups are not allowed
- 9What does
x AND 00001111achieve?1- AIt masks off the upper four bits, keeping only the lower nibble
- BIt shifts x right by four
- CIt toggles all the bits
- DIt sets the upper four bits to 1
- 10Why is simplifying a Boolean expression worthwhile?1
- AIt increases the number of inputs
- BIt makes the truth table smaller
- CFewer gates means lower cost, less power, less heat and shorter propagation delay
- DIt removes the need for a circuit diagram
Section B
Answer in the space provided. The number of marks tells you how many separate points to make.
- 1ConvertConvert the denary number -45 into 8 bit two's complement, showing your working.3
- 2ExplainExplain why a floating point number is normalised.3
- 3ExplainExplain the trade off between range and precision in floating point representation.4
- 4SimplifySimplify the Boolean expression A.B + A.B' + A'.B, showing each step and naming the law used.5
- 5StateState De Morgan's laws and explain why simplifying a Boolean expression is useful in circuit design.5
Mark scheme
Section A
Section B
1 Convert the denary number -45 into 8 bit two's complement, showing your working. 3
One mark for each of the following, to a maximum of 3.
- Converts 45 to binary as 00101101
- Inverts all the bits to give 11010010
- Adds one to give 11010011
Model answer. First convert 45 into 8 bit binary: 32 + 8 + 4 + 1 = 45, giving 00101101. Then invert every bit, which produces 11010010. Finally add one, giving 11010011. Checking the result confirms it: -128 + 64 + 16 + 2 + 1 = -45.
2 Explain why a floating point number is normalised. 3
One mark for each of the following, to a maximum of 3.
- Normalisation adjusts the mantissa so it begins 01 for positive or 10 for negative
- This removes leading duplicate bits that carry no information
- The greatest possible precision is obtained from the available mantissa bits
Model answer. A floating point value can be written in many equivalent ways by shifting the mantissa and adjusting the exponent to compensate, and most of those forms waste bits. Normalisation adjusts the number so that the mantissa begins with 01 for a positive value or 10 for a negative one, which guarantees that the leading bits actually carry information rather than simply repeating the sign. Because no mantissa bits are wasted on redundant leading zeros or ones, the maximum possible precision is obtained from the fixed number of bits available. Normalisation also gives every value a single unique representation, which makes comparison and arithmetic in hardware much simpler.
3 Explain the trade off between range and precision in floating point representation. 4
One mark for each of the following, to a maximum of 4.
- The mantissa determines precision
- The exponent determines range
- The total number of bits is fixed
- Increasing one necessarily reduces the other
Model answer. In a floating point representation the mantissa holds the significant digits of the value and therefore determines how precisely a number can be represented, while the exponent determines how far the binary point can be shifted and therefore how large or small a magnitude can be expressed, which is the range. Because the total number of bits available for a value is fixed, every bit allocated to the exponent is a bit taken from the mantissa and vice versa. Increasing the exponent field allows very large and very small numbers to be represented but leaves fewer mantissa bits, so values are stored to fewer significant figures and rounding errors become larger. Increasing the mantissa gives greater accuracy for each stored value but restricts the magnitudes that can be represented at all. A designer must therefore choose the split according to whether the application needs to handle extreme magnitudes or to represent moderate values very accurately.
4 Simplify the Boolean expression A.B + A.B' + A'.B, showing each step and naming the law used. 5
One mark for each of the following, to a maximum of 5.
- Factorises A from the first two terms
- Applies the inverse law that B + B' equals 1
- Simplifies A.1 to A using the identity law
- Reaches A + A'.B
- Simplifies to A + B using the absorption or distributive law
Model answer. Starting with A.B + A.B' + A'.B, factorise A out of the first two terms to give A.(B + B') + A'.B. By the inverse law B + B' equals 1, so this becomes A.1 + A'.B, and by the identity law A.1 is simply A, leaving A + A'.B. Applying the distributive law gives (A + A').(A + B), and since A + A' equals 1 by the inverse law this becomes 1.(A + B), which by the identity law simplifies to A + B. The final simplified expression is therefore A + B, reduced from three AND terms and two OR operations to a single OR gate.
5 State De Morgan's laws and explain why simplifying a Boolean expression is useful in circuit design. 5
One mark for each of the following, to a maximum of 5.
- States that the negation of an AND is the OR of the negations
- States that the negation of an OR is the AND of the negations
- Simplification reduces the number of logic gates required
- This lowers manufacturing cost and reduces power consumption and heat
- It also reduces propagation delay so the circuit operates faster
Model answer. De Morgan's laws state that the complement of a conjunction equals the disjunction of the complements, written (A.B)' = A' + B', and that the complement of a disjunction equals the conjunction of the complements, written (A+B)' = A'.B'. In words, breaking the negation bar over an expression requires changing AND to OR or OR to AND. Simplification matters in circuit design because every term and every operator in a Boolean expression corresponds to physical logic gates on a chip. Reducing an expression from six gates to two directly reduces the number of transistors required, which lowers the manufacturing cost of every unit produced and reduces the physical area occupied on the die, allowing more circuitry in the same space. Fewer gates also draw less current, so the circuit consumes less power and generates less heat, which matters greatly in battery powered and densely packed devices. Finally, each gate a signal passes through introduces a small propagation delay, so a shallower simplified circuit produces its output sooner and can therefore be clocked at a higher frequency.