4.3.5
Flip Flops & Adder Circuits
D Type Flip Flops
D Type Flip Flops
Flip flops are electronic circuits used within a computer’s memory to store single bits in one of two states, either a 1 or a 0. Flip flops can alter the state from one to the other.
![Illustrative background for D type flip flops](https://image-v2.cdn.app.senecalearning.com/2020-08/2ee5f032-a3ce-4e06-a77c-a072170a2989/Screenshot%202020-08-26%20at%2012.28.44-min,h_400,q_80,w_640.png)
![Illustrative background for D type flip flops ?? "content](https://image-v2.cdn.app.senecalearning.com/2020-08/2ee5f032-a3ce-4e06-a77c-a072170a2989/Screenshot%202020-08-26%20at%2012.28.44-min,h_400,q_80,w_640.png)
D type flip flops
D type flip flops
- There are several types of flip flop, but by far the most common are D type flip flops.
- D type flip flops have two inputs:
- Data, D.
- A clock signal.
- D type flip flops have one output, Q.
![Illustrative background for Clock signal](https://image-v2.cdn.app.senecalearning.com/2020-08/a83c8176-5be1-4646-9a7b-0ee3d7ff7653/clock-1274699_1920,h_400,q_80,w_640.jpg)
![Illustrative background for Clock signal ?? "content](https://image-v2.cdn.app.senecalearning.com/2020-08/a83c8176-5be1-4646-9a7b-0ee3d7ff7653/clock-1274699_1920,h_400,q_80,w_640.jpg)
Clock signal
Clock signal
- The clock signal is a regular and steady pulse used by a CPU to time operations.
- The output Q of a D type flip flop can only be altered at the beginning of a clock signal.
- A change to Q will only occur if D is in a different state to what it was at the start of the previous clock signal.
- This happens regardless of whether or not there has been a change in between clock signals.
![Illustrative background for Signal diagram](https://image-v2.cdn.app.senecalearning.com/2020-08/523c6d27-e348-43bf-9f61-4b8c6de4e762/Screenshot%202020-08-26%20at%2012.28.47-min,h_400,q_80,w_640.png)
![Illustrative background for Signal diagram ?? "content](https://image-v2.cdn.app.senecalearning.com/2020-08/523c6d27-e348-43bf-9f61-4b8c6de4e762/Screenshot%202020-08-26%20at%2012.28.47-min,h_400,q_80,w_640.png)
Signal diagram
Signal diagram
- The top line shows the data, D, alternating between 0 and 1 at random.
- The middle line is the steady and regular pulse of the clock signal.
- The start of each pulse identified with an arrow.
- The bottom line is the output, Q.
![Illustrative background for Process](https://image-v2.cdn.app.senecalearning.com/2020-08/523c6d27-e348-43bf-9f61-4b8c6de4e762/Screenshot%202020-08-26%20at%2012.28.47-min,h_400,q_80,w_640.png)
![Illustrative background for Process ?? "content](https://image-v2.cdn.app.senecalearning.com/2020-08/523c6d27-e348-43bf-9f61-4b8c6de4e762/Screenshot%202020-08-26%20at%2012.28.47-min,h_400,q_80,w_640.png)
Process
Process
- At the first pulse, the output changes to ‘1’ to match D.
- At the second pulse, D is still ‘1’ so Q doesn’t change.
- At the third pulse, D is now ‘0’ so Q changes to ‘0’ at this point.
- At the fourth pulse, D is back to ‘1’ so Q changes to match it.
- The change in D in between clock pulses is ignored.
Adder Circuits
Adder Circuits
Adder circuits are used by the Arithmetic Logic Unit (ALU) in a processor to perform the addition of two binary digits.
![Illustrative background for Types of adder circuit](https://image-v2.cdn.app.senecalearning.com/2018-08/c7c2a77c-8f38-450a-a083-bbfd3f6801d4/plus-sign-add-,h_400,q_80,w_640.png)
![Illustrative background for Types of adder circuit ?? "content](https://image-v2.cdn.app.senecalearning.com/2018-08/c7c2a77c-8f38-450a-a083-bbfd3f6801d4/plus-sign-add-,h_400,q_80,w_640.png)
Types of adder circuit
Types of adder circuit
- Adder circuits come in two forms:
- Half adder circuits.
- Full adder circuits.
![Illustrative background for Half adder circuits](https://image-v2.cdn.app.senecalearning.com/2020-08/7739bc90-a565-4ce8-a20d-0d868d8b8827/Screenshot 2020-08-27 at 09.01.05-min,h_400,q_80,w_640.png)
![Illustrative background for Half adder circuits ?? "content](https://image-v2.cdn.app.senecalearning.com/2020-08/7739bc90-a565-4ce8-a20d-0d868d8b8827/Screenshot 2020-08-27 at 09.01.05-min,h_400,q_80,w_640.png)
Half adder circuits
Half adder circuits
- Half adder circuits accept two inputs and output both the result and a carry bit.
- They make use of an XOR gate and an AND gate, laid out as shown.
![Illustrative background for Half adder table](https://image-v2.cdn.app.senecalearning.com/2020-08/f0e79d00-5215-4849-a8e5-b198aefaba8b/Screenshot 2020-08-27 at 09.01.07-min,h_400,q_80,w_640.png)
![Illustrative background for Half adder table ?? "content](https://image-v2.cdn.app.senecalearning.com/2020-08/f0e79d00-5215-4849-a8e5-b198aefaba8b/Screenshot 2020-08-27 at 09.01.07-min,h_400,q_80,w_640.png)
Half adder table
Half adder table
- The actions of the two gates can be displayed in a table as shown.
- The output at S gives the 20 binary digit.
- The output at C gives the 21 binary digit (the carry bit).
![Illustrative background for Full adder circuits](https://image-v2.cdn.app.senecalearning.com/2020-08/37eadf90-b90e-4e66-af16-dd36c59cedc9/Screenshot 2020-08-27 at 09.01.09-min,h_400,q_80,w_640.png)
![Illustrative background for Full adder circuits ?? "content](https://image-v2.cdn.app.senecalearning.com/2020-08/37eadf90-b90e-4e66-af16-dd36c59cedc9/Screenshot 2020-08-27 at 09.01.09-min,h_400,q_80,w_640.png)
Full adder circuits
Full adder circuits
- Full adders have the same output as a Half Adder (the sum and a carry bit), but they accept three inputs (two bits plus a carry bit).
- They are constructed from two Half Adders.
![Illustrative background for Full adder table](https://image-v2.cdn.app.senecalearning.com/2020-08/fe6a6634-e043-4f81-80bb-92bcd8068179/Screenshot 2020-08-27 at 09.01.10-min,h_400,q_80,w_640.png)
![Illustrative background for Full adder table ?? "content](https://image-v2.cdn.app.senecalearning.com/2020-08/fe6a6634-e043-4f81-80bb-92bcd8068179/Screenshot 2020-08-27 at 09.01.10-min,h_400,q_80,w_640.png)
Full adder table
Full adder table
- In a full adder:
- S = A XOR B XOR C(in)
- C(out) = (A AND B) OR (C(in) AND (A XOR B))
1Components of a Computer
1.1Structure & Function of the Processor
1.2Types of Processors
2Software & Software Development
2.1Systems Software
2.2Applications Generation
2.3Software Development
3Exchanging Data
3.1Compression, Encryption & Hashing
3.3Networks
4Data Types, Data Structures & Algorithms
4.1Data Types
5Legal, Moral, Cultural & Ethical Issues
5.1Computing Related Legislation
6Elements of Computational Thinking
6.1Thinking Abstractly
6.2Thinking Procedurally
6.3Thinking Logically
7Problem Solving & Programming
7.1Programming Techniques
7.2Programming Construction
Jump to other topics
1Components of a Computer
1.1Structure & Function of the Processor
1.2Types of Processors
2Software & Software Development
2.1Systems Software
2.2Applications Generation
2.3Software Development
3Exchanging Data
3.1Compression, Encryption & Hashing
3.3Networks
4Data Types, Data Structures & Algorithms
4.1Data Types
5Legal, Moral, Cultural & Ethical Issues
5.1Computing Related Legislation
6Elements of Computational Thinking
6.1Thinking Abstractly
6.2Thinking Procedurally
6.3Thinking Logically
7Problem Solving & Programming
7.1Programming Techniques
7.2Programming Construction
![Go student ad image](/en-GB/revision-notes/_next/image?url=%2Fen-GB%2Frevision-notes%2Fimages%2Fgo-student-uk-ad.jpg&w=640&q=100)
Unlock your full potential with GoStudent tutoring
Affordable 1:1 tutoring from the comfort of your home
Tutors are matched to your specific learning needs
30+ school subjects covered