How Do D-Type Flip-Flops and Full Adders Work in Digital Circuits?

  • Thread starter Physicist3
  • Start date
In summary: Feedback is used at D flip-flops to make sequential machines. For instance, connecting D to the inverted Q let's the output change at every clock period, dividing the frequecy by 2. This wouldn't work with a latch. (Much) more refined feedback is used, for instance with 4 flip-flops to make a counter by 10 or 11 depending on one input, which is used at PLL. Or to create PN sequences, or to make the sequencer or a microprocessor... Then the feedback logic can be seriously complicated. In difficult cases this logi is created by a software and realized with suboptimum but regular building blocs like a programmable cell array.
  • #1
Physicist3
104
0
Hi guys, just wandering if you could help me clear some things up regarding full adders and d-type flipflops?

Firstly, regarding a d-type flip-flop, does the flipflop store the value which is received at 'd' and then send this to the output 'q' at the next available time (e.g. next rising clock edge or falling clock edge if negative triggered)?
With a full adder, i understand that if two numbers A and B (1 and 1) are added, the binary output will be 10 and therefore carry (out) will = 1 and Sum(s) = 0, but what is the Cin (carry In) for? Is this from a previous full adder?

Thanks :)
 
Engineering news on Phys.org
  • #2
Sorry to add but what are the feedback loops for on a D-type flip-flop? :)
 
  • #3
Physicist3 said:
Hi guys, just wandering if you could help me clear some things up regarding full adders and d-type flipflops?

Firstly, regarding a d-type flip-flop, does the flipflop store the value which is received at 'd' and then send this to the output 'q' at the next available time (e.g. next rising clock edge or falling clock edge if negative triggered)?
The data bit at the D input is latched and clocked through to the output on the clock edge (whether rising or falling depends on which D FF topology you are using).

Physicist3 said:
With a full adder, i understand that if two numbers A and B (1 and 1) are added, the binary output will be 10 and therefore carry (out) will = 1 and Sum(s) = 0, but what is the Cin (carry In) for? Is this from a previous full adder?

Thanks :)
Yes, the carry in would be from the previous bit in the adder. If it is bit 0 in the adder, the Cin would always be 0.

Physicist3 said:
Sorry to add but what are the feedback loops for on a D-type flip-flop? :)
Feedback us used to latch the data. Without feedback and latching, whenever the input data changed, the output would change. You need the feedback to have "memory". :smile:
 
  • #4
There are funny refinements with adders, especially circuitry called "carry lookahead" (Web search keywords), which shortens the carry chain by avoiding the carry signal to pass through every bit sequentially. Though, the "ripple carry" is perfectly possible and suffices for understanding.

A D flip-flop memorizes always the value the D input had when its clock input told to sample D, and transmits this value to Q with no intentional delay - that is, a propagation delay is unavoidable but does not result from the clock.

This opposes to a latch, which transmits every change in D when the clock has one level, and stops changing when the clock has the other level.

Feedback is used at D flip-flops to make sequential machines. For instance, connecting D to the inverted Q let's the output change at every clock period, dividing the frequecy by 2. This wouldn't work with a latch. (Much) more refined feedback is used, for instance with 4 flip-flops to make a counter by 10 or 11 depending on one input, which is used at PLL. Or to create PN sequences, or to make the sequencer or a microprocessor... Then the feedback logic can be seriously complicated. In difficult cases this logi is created by a software and realized with suboptimum but regular building blocs like a programmable cell array.

In CMOS technology only, a D flip-flop consists of two D latches with opposite clocks. This design is race-safe in CMOS, not in other technologies. TTL flip-flops had a completely different design. Race-safe design is very interesting but difficult.
 
  • #5
Could someone please explain what the it means by 'latched' and how this works? I am trying to understand how divide by 2 counters work and its the feedback bit that's confusing me :) Thanks
 
  • #6
Physicist3 said:
Could someone please explain what the it means by 'latched' and how this works? I am trying to understand how divide by 2 counters work and its the feedback bit that's confusing me :) Thanks

The simplest latch is a "Cross-Coupled NAND Latch" (or you can make it with NOR gates alternately). Have a look at the animation at this Wikipedia page (part way down on the right, showing the operation of the cross-coupled NOR latch:

http://en.wikipedia.org/wiki/Flip-flop_(electronics )

This structure is the building block for memories and FFs. You add extra stuff around it in order to implement different kinds of FFs with different features (like clear, set, etc.)

For a simple ripple counter, just feed the output of on FF into the clock input of the next. The output of the first FF changes half as fast as its input clock, so the clock for FF2 is half as fast as the clock for FF1. That is how you get slower and slower square waves out of each stage of the ripple counter, and how it counts through the range of binary numbers at the FF outputs.

http://www.ee.usyd.edu.au/tutorials/digital_tutorial/part2/pics/count02.jpg
 

Attachments

  • Ripple Counter.jpg
    Ripple Counter.jpg
    38.8 KB · Views: 2,673
Last edited by a moderator:

1. What is a full adder and how does it work?

A full adder is a digital circuit used to perform addition of two binary numbers. It takes three inputs (two binary digits and a carry bit) and produces two outputs (the sum and the carry bit). It works by using two half adders and an additional OR gate to handle the carry bit.

2. What is the purpose of a D-type flipflop?

A D-type flipflop is a type of sequential logic circuit that stores one bit of data. It is commonly used in digital systems for storing and transferring data. It works by using a clock signal to update the stored value based on the input.

3. How do I design a full adder circuit?

To design a full adder circuit, you will need to first understand the logic behind it and its truth table. Then, you can use logic gates (such as AND, OR, and XOR gates) to implement the circuit. You may also need to use a multiplexer to handle the carry bit. There are also various online tools and software that can assist in designing a full adder circuit.

4. What is the difference between a half adder and a full adder?

A half adder is a basic digital circuit that can add two single-digit binary numbers and produce a sum and carry bit. A full adder is an extension of a half adder that can also handle a carry bit from a previous calculation. It is able to produce a sum and carry bit for inputs of three binary digits.

5. Can you provide an example of a full adder and D-type flipflop circuit in action?

An example of a full adder and D-type flipflop circuit in action is a binary counter. The full adder is used to add the binary input (0 or 1) to the current count stored in the D-type flipflop. The output of the flipflop is then fed back into the circuit as the new count, and the process is repeated with each clock cycle, resulting in a counting sequence of binary numbers.

Similar threads

Replies
6
Views
5K
  • Engineering and Comp Sci Homework Help
Replies
2
Views
3K
  • Engineering and Comp Sci Homework Help
Replies
7
Views
5K
  • Engineering and Comp Sci Homework Help
Replies
1
Views
2K
  • Engineering and Comp Sci Homework Help
Replies
31
Views
2K
  • Electrical Engineering
Replies
2
Views
17K
  • Engineering and Comp Sci Homework Help
Replies
1
Views
6K
  • Computing and Technology
Replies
2
Views
31K
  • Engineering and Comp Sci Homework Help
Replies
1
Views
2K
  • Engineering and Comp Sci Homework Help
Replies
22
Views
5K
Back
Top