How are arithmetic and memory built from logic gates using adders and flip-flops?
Logic circuits built from gates: the half adder and full adder for binary addition, and the D-type flip-flop as a single-bit memory element, including their truth tables and Boolean expressions.
An OCR H446 answer on logic circuits: the half adder and full adder that perform binary addition (with their sum and carry expressions and truth tables), and the D-type flip-flop that stores a single bit, including how these combine to build arithmetic and memory.
Reviewed by: AI editorial process; not yet individually human-reviewed
Have a quick question? Jump to the Q&A page
Jump to a section
What this dot point is asking
OCR wants the half adder and full adder (their truth tables and the Boolean expressions for sum and carry, and why the full adder is needed for multi-bit addition), and the D-type flip-flop as a clocked single-bit store. Expect "give the sum and carry expressions" and "explain how a flip-flop stores a bit" questions.
The answer
The half adder
The full adder
The D-type flip-flop
Examples in context
The arithmetic logic unit adds with a chain of full adders, and subtracts by adding the two's complement, so one circuit does both. Registers such as the accumulator and program counter are built from D-type flip-flops, which is why register access is so fast. Counters made from flip-flops drive timing and the program counter's increment. OCR ties this to number representation (the binary the adder processes), to Boolean simplification (designing the gate-level circuits), and to processor architecture (registers and the ALU).
Try this
Q1. Give the Boolean expressions for the sum and carry outputs of a half adder. [2 marks]
- Cue. Sum ; carry .
Q2. State why a full adder, rather than a half adder, is used for all but the least significant bit when adding multi-bit numbers. [2 marks]
- Cue. A full adder has a carry-in, so the carry from the previous column can be included; a half adder has no carry-in and cannot be chained.
Q3. State what happens to a D-type flip-flop's output on the rising edge of the clock. [1 mark]
- Cue. It captures the value on the D input and holds it at Q until the next clock edge.
Exam-style practice questions
Practice questions written in the style of OCR exam questions on this dot point, with worked answer explainers. The year tag is the paper they imitate, not the source.
OCR 20206 marksDescribe the function of a half adder, give the Boolean expressions for its sum and carry outputs, and explain why a full adder is needed to add multi-bit numbers.Show worked answer β
Half adder (up to 3): a half adder adds two single binary digits and , producing a sum and a carry. Its truth table: gives sum 0 carry 0; and give sum 1 carry 0; gives sum 0 carry 1.
Expressions (up to 2): the sum is (XOR) and the carry is (AND).
Why a full adder (up to 1): a half adder has no input for a carry coming in from a less significant column, so it cannot be chained to add multi-bit numbers. A full adder adds three inputs (, and a carry-in), so full adders can be cascaded, the carry-out of one feeding the carry-in of the next. Markers reward the half adder's two outputs, the XOR/AND expressions, and the carry-in limitation.
OCR 20225 marksExplain the purpose of a D-type flip-flop, how it stores a bit, and one use of flip-flops in a computer.Show worked answer β
Purpose and operation (up to 3): a D-type flip-flop is a circuit that stores a single bit. It has a data input D and a clock input. On the active (rising) edge of the clock, the value on D is captured and appears at the output Q, and it is then held stable until the next clock edge, regardless of further changes on D between edges. This makes it edge-triggered and synchronous.
Use (up to 2): flip-flops are the building block of registers and other volatile memory, storing the bits of data the processor works on; grouped together they form registers, counters and the basis of static RAM. Markers reward "stores one bit", capture on the clock edge and hold, and a valid use such as registers or counters. A common error is omitting the role of the clock.
Related dot points
- Number systems: binary, denary and hexadecimal conversion, representing negative numbers with sign and magnitude and two's complement, binary addition and subtraction, fixed-point binary fractions, and the use of hexadecimal and bitwise masks.
An OCR H446 answer on number systems: converting between binary, denary and hexadecimal, representing negative numbers with sign and magnitude and two's complement, binary addition and subtraction, fixed-point binary fractions, and the use of hexadecimal and bitwise masks.
- Floating-point representation of real numbers using a mantissa and an exponent (both in two's complement), normalisation of a floating-point number, and the trade-off between range and precision.
An OCR H446 answer on floating-point representation: storing real numbers with a mantissa and an exponent in two's complement, how to normalise a floating-point number, and the trade-off between range and precision when bits are divided between mantissa and exponent.
- Logic gates (AND, OR, NOT, XOR, NAND, NOR) and their truth tables, constructing and interpreting truth tables, and simplifying Boolean expressions using the laws of Boolean algebra including De Morgan's laws, distribution, association and commutation, and Karnaugh maps.
An OCR H446 answer on Boolean algebra and logic: the logic gates (AND, OR, NOT, XOR, NAND, NOR) and their truth tables, constructing truth tables for an expression, and simplifying Boolean expressions using the laws of Boolean algebra, De Morgan's laws and Karnaugh maps.
- The structure and function of the processor: the arithmetic logic unit, control unit, registers (PC, ACC, MAR, MDR, CIR), buses (data, address, control), and the fetch-decode-execute cycle in the von Neumann architecture.
An OCR H446 answer on the structure and function of the processor: the ALU, control unit, the five registers (PC, ACC, MAR, MDR, CIR), the data, address and control buses, and a step-by-step trace of the fetch-decode-execute cycle in the von Neumann architecture.
- Thinking logically: identifying the decision points and conditions that affect the flow of a solution; computational methods including problem recognition, divide and conquer, backtracking, heuristics, performance modelling and visualisation.
An OCR H446 answer on thinking logically and computational methods: identifying decision points and conditions in a solution, and the methods of problem recognition, divide and conquer, backtracking, heuristics, performance modelling and visualisation that make problems solvable.