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.
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.
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.
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.
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.
Types of adder circuit
Types of adder circuit
- Adder circuits come in two forms:
- Half adder circuits.
- Full adder circuits.
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.
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).
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.
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
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