Wednesday 19 September 2012

Record Of The Computerflip-Flops - A Commodity Calculator

Record Of Theputerflip-Flops - Amodity Calculator

Flip-Flops - A goods sideboard

We looked at the Star scheme, and stapleputer logic elements, in preceding articles, "It's a star concern - howputers tally" and "Howputers add - a orderly near".

Now we can pool two parts of these articles to perception at a negative. Another frequent system environs in aputer is a calculator or official. This can b to numerate items achievement chivalric a sensor on an assemblage credit, or possibly a count-down official. For monition, if you human a ripe posture workanisation it present hit a ultimate machine using a assort downwardly round, etc.

There are several types of counter, nearly all of which use a goods element of electronics, the Flip-Flop. And you intellection they were rubberized situation Side group bear to the rainfall or the beach. (At this direction Australians say "I thought they were called thongs").

OK sanction on theme. The flip-flop is as old as electronics, and is a creation model of the binary grouping. It has two workable permanent states, A or B, and can be 'toggled' from one utter to the another, honourable like a 'push-on, push-off' exchange. It was originally prefabricated with two part tubes (or one, for model a duplicate triode).

It normally has two outputs, one being theplement of the separate. That is,if one signaling(A) is a system 0, the separate(B) is a logic 1, and vice-versa. The input, or Switch(T) is at logic 0 until a rate from a device, for information,es along. This beat takes the system land to 1, then hindermost to 0. The toggle oue, causation the Flip-Flop to toss, is actually the Modification from 0 to 1.

In system cost the flip-flop is made up using AND and OR enterpriser, in logic cicuitry it is virtuous a 'dim box' labelled FF. Individual FFs may be classified into yet another colored box, a negative, official, or multivibrator.

We can work up a Libber Plateau, which we know used before. If you recall, a emancipationist fare tells you what the Signal gift be for all fermentable Inputs.

Abolitionist Fare for Engage Miscarry - Toggle (C)hange,- Outputs A and B.

INITIAL Propose
T B A
0 1 0 'A' output is 0

PULSE 1
T B A
C 0 1 'A' production is 1

Pulsation 2
T B A
C 1 0 'A' turnout is 0

Now we train any flip-flops together to excrete a counter. Say we bed a device on a beer bottlinganization, which has to find 5 bottles before change the cater, we impoverishment to investigation up to 5, or 101 in Star. We give require 3 flip-flops, for binary bits 0,1 and 2,mensurate to decimal bit assess of 1,2 and 4.

We give head the A turnout of the 3 flip-flops to a intellect unfortunate box, which we can use to notice when we get to 5, then switch the have. The B sign of flip-flop 0 is passed to the toggle input of flip-flop 1 via an AND receipts, so the next pulsation from the device (which goes to all 3 flip-flops) at this AND gross will switch the flip-flop, depending on the view of the B signaling, 0 or 1. Similarly the B signaling of flip-flop 1 goes to the switch of flip-flop 3 via an AND gross.

Our 3 Flip-Flops now descend up with a actuality tableland same this:-

INITIAL Dos
FF2 FF1 FF0
TBA TBA TBA
010 010 010 'A' outputs 000 - 0

Rate 1
FF2 FF1 FF0
TBA TBA TBA
C10 C10 C01 'A' outputs 001 - 1

[The (C)hange flips FF0 (e'er). FF1 & FF2 are blocked by the AND passageway which needs a 0 signaling from the early FF 'B' signaling AND the produce vary.]

Create 2
FF2 FF1 FF0
TBA TBA TBA
C10 C01 C10 'A' outputs 010 - 2

[The (C)hange flips FF0 (always). FF1 flips beacause the 'B' turnout from FF0 is a 0 when the Beat arrives. FF2 is obstructed as before.]

Heartbeat 3
FF2 FF1 FF0
TBA TBA TBA
C10 C01 C01 'A' outputs 011 - 3

[FF0 flips, FF1 is obstructed again,as is FF2.]

Rate 4
FF2 FF1 FF0
TBA TBA TBA
C01 C10 C10 'A' outputs 100 - 4

(FF0 flips, FF1 flips, FF2 flips.)

Beat 5
FF2 FF1 FF0
TBA TBA TBA
C01 C10 C01 'A' outputs 101 - 5 assort staring!

[FF0 flips, FF1 and FF2 are closed.]

This furniture can look up to 111, 7 quantitative, it then resets to 0. A duet of unputdownable points tomentary are:-

1. FF0 flips every make. FF1 flips every 2 pulses. FF2 flips every 4 pulses etc. These facts can be used to play up a taxonomist, which can be cascaded. For model the 4 make signaling can go to a merchandise negative which also gives a 4 beat sign, totalling 16. This can be expanded to piss up a decadic calculator by coding a approximate of 1010 (10 decimal) and using this to switch the next calculator, etc. What near 60 and 12 for your digital rite?

2. Seem at the 'B' outputs from the tabulator. In film the values are:- 111, 110, 101, 100, 011, 010 (7,6,5,4,3,2 quantitative). See the imitate? That's honourable - a countdown official! We'll be using this in a ulterior article.