Main Menu
Articles Home
Most Popular Articles
Top Authors
Submit Articles
Submission Guidelines
Link to Us
Bookmark
Contact Us



Partners
 
Home / Computers

History Of The Computerflip-Flops - A Basic Counter

By:Tony Stockill


Flip-Flops - A basic counter



We looked at the Binary system, and basic computer logic elements, in previous articles, "It's a binary world - how computers count" and "How computers add - a logical approach".



Now we can combine two parts of these articles to look at a counter. Another common logic element in a computer is a counter or timer. This can b to count items going past a sensor on an assembly line, or possibly a count-down timer. For example, if you have a late model washing machine it will have a simple computer using a count down timer to give 10 minute wash cycle, etc.



There are several types of counter, nearly all of which use a basic element of electronics, the Flip-Flop. And you thought they were rubber shoes English people wear to the shower or the beach. (At this point Australians say "I thought they were called thongs").



OK back on topic. The flip-flop is as old as electronics, and is a classic example of the binary system. It has two possible stable states, A or B, and can be 'toggled' from one state to the other, just like a 'push-on, push-off' switch. It was originally made with two vacuum tubes (or one, for example a double triode).



It normally has two outputs, one being the complement of the other. That is,if one output(A) is a logic 0, the other(B) is a logic 1, and vice-versa. The input, or Toggle(T) is at logic 0 until a pulse from a sensor, for example, comes along. This pulse takes the logic state to 1, then back to 0. The toggle effect, causing the Flip-Flop to flip, is actually the CHANGE from 0 to 1.



In logic terms the flip-flop is made up using AND and OR gates, in logic cicuitry it is just a 'black box' labelled FF. Several FFs may be grouped into yet another black box, a counter, timer, or multivibrator.



We can make up a Truth Table, which we have used before. If you recall, a truth table tells you what the Output will be for all possible Inputs.



TRUTH TABLE for Flip Flop - Toggle (C)hange,- Outputs A and B.



INITIAL STATE

T B A

0 1 0 'A' output is 0



PULSE #1

T B A

C 0 1 'A' output is 1



PULSE #2

T B A

C 1 0 'A' output is 0



Now we string some flip-flops together to make a counter. Say we have a sensor on a beer bottling machine, which has to count 5 bottles before switching the feed, we need to count up to 5, or 101 in Binary. We will need 3 flip-flops, for binary bits 0,1 and 2, corresponding to decimal bit value of 1,2 and 4.



We will take the A output of the 3 flip-flops to a decoder black box, which we can use to detect when we get to 5, then switch the feed. The B output of flip-flop 0 is passed to the toggle input of flip-flop 1 via an AND gate, so the next pulse from the sensor (which goes to all 3 flip-flops) at this AND gate will toggle the flip-flop, depending on the value of the B output, 0 or 1. Similarly the B output of flip-flop 1 goes to the toggle of flip-flop 3 via an AND gate.



Our 3 Flip-Flops now come up with a truth table like this:-



INITIAL STATE

FF2 FF1 FF0

TBA TBA TBA

010 010 010 'A' outputs 000 - 0



PULSE #1

FF2 FF1 FF0

TBA TBA TBA

C10 C10 C01 'A' outputs 001 - 1



[The (C)hange flips FF0 (always). FF1 & FF2 are blocked by the AND gate which needs a 0 input from the previous FF 'B' output AND the pulse change.]



PULSE #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' output from FF0 is a 0 when the Pulse arrives. FF2 is blocked as before.]



PULSE #3

FF2 FF1 FF0

TBA TBA TBA

C10 C01 C01 'A' outputs 011 - 3



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



PULSE #4

FF2 FF1 FF0

TBA TBA TBA

C01 C10 C10 'A' outputs 100 - 4



(FF0 flips, FF1 flips, FF2 flips.)



PULSE #5

FF2 FF1 FF0

TBA TBA TBA

C01 C10 C01 'A' outputs 101 - 5 count complete!



[FF0 flips, FF1 and FF2 are blocked.]



This counter can count up to 111, 7 decimal, it then resets to 0. A couple of interesting points to note are:-



1. FF0 flips every pulse. FF1 flips every 2 pulses. FF2 flips every 4 pulses etc. These facts can be used to make up a divider, which can be cascaded. For example the 4 pulse output can go to a second counter which also gives a 4 pulse output, totalling 16. This can be expanded to make up a decadic counter by decoding a count of 1010 (10 decimal) and using this to toggle the next counter, etc. What about 60 and 12 for your digital watch?



2. Look at the 'B' outputs from the counter. In sequence the values are:- 111, 110, 101, 100, 011, 010 (7,6,5,4,3,2 decimal). See the pattern? That's right - a countdown timer! We'll be using this in a later article.



Digg del.icio.us Blink Stumble Spurl Reddit Netscape Furl

Article keywords: history of the computer, computer history

Article Source: http://www.articles2k.com

Tony is an experienced computer engineer. He is currently webmaster and contributer to www.what-why-wisdom.com .A set of diagrams accompanying these articles may be seen at www.what-why-wisdom.com/history-of-the-computer-0.html .









Top Computers Articles
  • 1). The danger behind peer-to-peer file sharing  By : Migz Mon
    File sharing is very common nowadays. You can get a P2P (peer-to-peer) program for free, and soon start sharing stuff like music, videos and programs. We use these applications freely and most of us don’t know the risks involved when using them. Questionable reliability of files – Once we get our hands on a P2P program, we download everything we want like crazy.

  • 4). Is The Internet Censored?  By : J Schipper
    When most people think about Internet censorship, the usual suspects immediately come to mind : Communist China and repressive Islamic countries. Unfortunately, Westerners have an embarrassment all their own : Australia's net censorship law, established in 2000. Freedom House, a non-profit U.S. organization dedicated to spreading human rights and freedom, undertakes regular surveys on press freedom and censorship.

  • 5). Toshiba Libertto U100, smaller yet better than you might imagine!  By : john
    Have you ever wondered how small a laptop can be? Well, utilizing today’s technology Toshiba does a perfect job at demonstrating it; the Libertto U100 is one of the very few laptops that have such a rich feature set fitted altogether within such a small space. Of course, if you believe that a fingerprint authentication system is too much for such a.

  • 6). Does CCTV Really Reduce Crime?  By : Robert Michael
    In the UK, home of twenty percent of the world's CCTV cameras, there is mounting concern about its invasion and lack of regulation. "UK Public CCTV Surveillance Regulation Campaign." The thought-provoking questions they ask are good ones. They want to know, for instance, why, if television programming and licensing is so heavily regulated in the UK.

  • 8). Preparation Tips For Comptia A+ Certification  By :
    The Industry Standard CompTIA A Plus Certification exam has two parts; approximately 80 questions for each part. * Core Hardware: $153 - min. passing score 515 * Operating Systems Technology: $153 - min. passing score 505 (CompTIA corporate members can take the exams for $98, employers that require this test are usually corporate members and will inform you of this.

  • 9). Can Cell Phones Harm Your Health?  By : D Ruplinger
    It seems like everywhere a person goes there is at least one person in view with a cell phone to their ear whether it is on the road, in a store, in a parking lot, walking down the street, etc. Even in places where cell phone usage is banned such as concert halls or movie theaters there is the occasional offender, or more likely, at least a few people using the text messaging feature on their phone.


New Computers Articles
  • 5). If You Want Flexibility And Portability Consider A Laptop  By : Gregg Hall
    If you are one of those who works with a computer on a daily basis like me you should consider a laptop. I have actually owned three now and I think I would be lost without mine. I still use my desktop PC quite a bit at home but the laptop comes in extremely handy when I am away.

  • 7). Becoming A DVD Repair Expert Online  By : Maxine Schel
    Many conventional colleges and universities are now offering online DVD repair courses, which are the exact same as those taught on a traditional college campus, to distance learners. Online education is generally taught through the use of several different methods, including online satellite feeds, correspondence or online lessons. This technique permits the student to obtain a DVD repair degree without ever having to step inside of a classroom.

  • 8). Compatible Inkjet Cartridge  By : Isabel Rodrigues
    Once the printer ink runs dry it has to be replaced with another inkjet cartridge. There are many reputed companies like Canon, Epson, Dell, and Lexmark that provide the necessary cartridges to replace the empty cartridges. Replacing inkjet cartridge can add to a very big cost. It could be worse if you have to replace the empty cartridges frequently every month.

  • 9). Best Passwords  By : Richard Romando
    No sane person would ever like someone else reading her email. Or for that matter some other person using her password and breaking into a financial institution. You should, therefore, choose a strong, secure password in such a manner that would be a hard nut to crack for others and easy for you to remember. The more random and mixed-up you make it, the harder it is for others to crack.

  • 10). Home Printing Machines  By : Peter Vermeeren
    Home printing machines are available on the market today in many sizes, prices and capabilities. Many different forms of printing can be accomplished in the home. Whether you want to create unique tee-shirts using a home screen printing machine or you want to produce elegant laser printed letters, the equipment is readily available to you for home use.



 


© 2006 articles2k.com - Privacy Policy