Chapter 43 - Adders and D-type flip-flops Flashcards
Is it possible to output the results of a binary addition or subtraction?
» Yes with the right combination of gates
What is a half adder?
» An adder performs binary addition and subtraction
What is the purpose of a half adder?
» Performs addition of 2bits
How many inputs and outputs does a half adder produce?
» Takes an input of 2 bits of A and B and outputs results S and carry C
What gates does a half-adder consist of?
» XOR gate
» AND gate
What does S represent?
» The sum and is equal to A XOR B
What does C represent?
» Represents the Carry and is equal to A AND B
What are the disadvantages of a half adder?
» Can only add one bit
» No third input so cannot use the carry from a previous addition to add n bit numbers
If A and B was both 1, what is the value of S and C in a half adder?
» S = 0
» C = 1
What is a full adder?
» Consists of 2 half adders to add three bits together including the inputs A and B and a Carry bit
How many inputs and output does a full adder have?
» Has 3 inputs, A, B, and C(in)
» 2 outputs, the SUM(S) and C(out)
What gates does the full adder consist of?
» 2 XOR GATES
» 2 AND GATES
» 1 OR GATE
» 2 half adders and 1 OR
What is the boolean logic of S and C(out) in a full adder?
» S = (A XOR B) XOR C(in)
» C(out) = ((A XOR B) AND C ) OR ( A AND B)
What does concatenating full adders do?
» Can be connected to make n full adders
» Can input the carry bit into a subsequent adder along with the 2 new inputs
How can you simply add the adders together?
» Draw a diagram, with A0, B0, S0 and so on
» Then simply add the values and where appropriate carry a single bit
What is a flip flop?
» An elemental sequential logic circuit that can store on bit and flip between 2 states, 0 and 1
» How many inputs does a D - Type flip flop have?
» 2 inputs one called D
» Other one called clock signal input
What is the clock?
» Or also known as the oscillator is another type of sequential circuit that changes state at regular time intervals
Why is the clock needed?
» Needed to synchronise the change of state of flip flop circuit
What is the clock perod?
» The time between the 2 rising edge
What is the clock width?
» The width between the rising edge, and falling edge
When can the D- type flip flop only change states?
» Changes on the rising edge of of the clock signal
What does the D stand for in D-type flip flop?
» D stands for Data or Delay
What does it mean by a positive edge triggered flip flop?
» Can only change the output value from 1 to 0
What happens when the clock is not a positive edge?
» The input value is held and does not change
Why is a D-type flip flop important?
» Can be used as a memory cell to store the state of a bit
When does the output Q take a new value?
» When the value at D has changed at the point of a clock pulse
» This means the clock pulse will freeze or store the input value of D until the next clock pulse
What are the uses of the D-type flip flops?
» Creating registers and counters
» Used for intermediate storage needed using arithmetic operations
What is Static RAM?
» RAM that is created using several D-Type flip flops
» What are the advantages of SRAM?
» Much faster then DRAM - Dynamic RAM
What are the disadvantages of SRAM?
» More expensive then DRAM
What is SRAM and DRAM used for?
» SRAM used for cache memory
» DRAM used for main memory
How many flip flops are required to store 8 - bits?
» 8 flip flops
Describe how the clock signal in a D type flip flop works?
» Clock signal is a regular steady pulse used by a CPU to time operations
» Output Q can only be altered at the beginning of a clock signal
» 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
What binary operation is performed by adders?
» Addition
Explain what a Full adder circuit does
» This circuit consists of 2 half adders, and is called a full adder.
» It has 3 inputs called A, B and C(in), A and B are the inputs from the computer, and C(in) is the carry bit.
» This logic circuit produces the sum of A, B and Cin using XOR gates, the sum is then stored in a seperate memory location.
» C, out is the carry bit and in the next fuller adder it will be represented as Cin, C, out is the carry bit from the 3 inputs of A, B and Cin