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

  • Thread starter Thread starter Physicist3
  • Start date Start date
AI Thread Summary
A D-type flip-flop stores the value at its D input and outputs this value at the next clock edge, with feedback used to maintain its state and create memory. In a full adder, the carry-in (Cin) is sourced from the previous adder stage, allowing for multi-bit addition. The feedback loops in D flip-flops enable sequential logic operations, such as frequency division and more complex functions like counters and microprocessor operations. The discussion highlights the differences between flip-flops and latches, emphasizing that flip-flops sample data at clock edges while latches continuously reflect input changes. Understanding these concepts is crucial for designing digital circuits effectively.
Physicist3
Messages
103
Reaction score
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
Sorry to add but what are the feedback loops for on a D-type flip-flop? :)
 
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:
 
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.
 
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
 
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,828
Last edited by a moderator:
Hi all I have some confusion about piezoelectrical sensors combination. If i have three acoustic piezoelectrical sensors (with same receive sensitivity in dB ref V/1uPa) placed at specific distance, these sensors receive acoustic signal from a sound source placed at far field distance (Plane Wave) and from broadside. I receive output of these sensors through individual preamplifiers, add them through hardware like summer circuit adder or in software after digitization and in this way got an...
I am not an electrical engineering student, but a lowly apprentice electrician. I learn both on the job and also take classes for my apprenticeship. I recently wired my first transformer and I understand that the neutral and ground are bonded together in the transformer or in the service. What I don't understand is, if the neutral is a current carrying conductor, which is then bonded to the ground conductor, why does current only flow back to its source and not on the ground path...
I have recently moved into a new (rather ancient) house and had a few trips of my Residual Current breaker. I dug out my old Socket tester which tell me the three pins are correct. But then the Red warning light tells me my socket(s) fail the loop test. I never had this before but my last house had an overhead supply with no Earth from the company. The tester said "get this checked" and the man said the (high but not ridiculous) earth resistance was acceptable. I stuck a new copper earth...
Back
Top