Ricochet is the best place on the internet to discuss the issues of the day, either through commenting on posts or writing your own for our active and dynamic community in a fully moderated environment. In addition, the Ricochet Audio Network offers over 50 original podcasts with new episodes released every day.
How to Build a Computer 20: Digital Watches
Because I’m the sort of simian who still thinks that digital watches are pretty neat, I figured I’d work through a practical example. We know how to represent binary numbers, and we know how to express logic with gates. That’s enough knowledge to be dangerous. From there I worked out how to light the lights on a digital watch face. Here, let me show you. But first a quick disclaimer. This isn’t my area of expertise; odds are there are plenty of ways to do this better or more efficiently. I can say at least that this one works.
Okay, let’s talk numbers. Recall from the discussion of binary that you can express any normal number as a series of ones and zeros. So, for example, you could draw One (that is, the presence of bread) in the 4’s place, one in the 2’s place, one in the 1’s place. 4 + 2 + 1 = 7
We’re assuming that we’ve got the input signal. What we’re trying to do then is work out the logic to change that binary number into a recognizable digit. Here’s how the logic looks in Excel:
That’s a five (Yeah, the contrast could be better). We’ve got four input wires and we’ll make ten digits out of the combination of them. To get from the one to the other you’ve got to work out the logic. For reference here’s the first ten numbers in binary:
I’m going to assume you’ve spent mornings staring balefully at an alarm clock that just wouldn’t quit beeping, so I’m not going to also go over the different lights in the number. Let’s work through the logic for the top light (marked “A” in the picture.)
It’s off for 1, on for 2 and 3, off for 4, on for five, six, seven, eight and nine. Oh, and on when all the signals are off; that zero thing again. So we need it on whenever the input number isn’t 1 or 4. Look at those numbers in binary. If only the 1’s spot or the 4’s spot is on then the light is off, otherwise it’s on. From that we can work out a couple rules immediately:
- If the eight’s place is on (8 or 9) then the light is on.
- If the two’s place is on you’re also good (2, 3, 6, 7)
- If nothing’s on (0) then the light is on.
That leaves only one number that isn’t covered; 5. If both the ones spot and the 4’s spot is on then we need to have the light on, but not if it’s only one. Rephrase that, and append it to the rules. The light is on if:
- 4 AND 1
- 8 OR 2
- NOT (1 OR 2 OR 4 OR 8)
If any one of those conditions is true you’re looking at a digit that’s neither 4 nor 1, and hence that top light should be on. You can draw that out with three gates (an AND, an OR, and a NOR). You know what? I’ll cut to the chase. Here’s a drawing of the individual lights and the logic circuits you could use to get there:
If you want to try this on your own, hey, go ahead. You’ve got all the tools to do it. But largely because I like hearing the sound of my own voice here’s how that Excel sheet works, with the formulas showing:
Start from cell B4. That’s the input number. The formulae in C4 to F5 are all to convert the decimal number into binary. The green and pink conditional formatting is for formula that resolve to TRUE and FALSE respectively. The number on the right is also done with conditional formatting. The individual cells link back to the formula (as designated by the letter.)
I hope you had fun with this because absolutely none of it will be on your test. Just one of those things when you’re learning things. You can read about it all day long but somehow you never make the connection between abstract knowledge and practical problem-solving. Once I realized I could solve this problem we were doomed to this quick jaunt through. We’ll return to our slow march through the basic logic required to turn electrons into the stuff that dreams are made of. Join us next week for “The Latch Racket” or “Someone help me find my keys already”.
This is part twenty of my ongoing series on building a computer, the ‘ya dere hey’ way. You may find previous parts under the tag How to Build a Computer. This week’s post has been brought to you by Vincent Price. A simple little matter like sponsorship from beyond the grave is nothing to Vincent Price!
[First – Silicon] [Previous – Logic Gates] [Next — Latches]
Published in Science & Technology
The full picture is not showing unless one does the “View Image” thing.
No cheese?
I can see it if I go full-screen with the browser window.
The sidebars are too wide.
On toast? What are you, a…
Now that you mention it though…
I assume the black toaster does Darth Vader.
I moved the photo from ‘full size’ to large. In the editing window ‘full size’ autoadjusts down to the width of the post. Evidently it doesn’t in the actual post.
Digital watches were still so novel in 1973 that a light up red LED watch got a surprise laugh when James Bond checks it in bed in “Live or Let Die”. I never realized that each facet of each digit has its own archipelago of logic gates, and each unit of those gate systems is itself made of a number of transistors. It does get to be like going to St. Ives, with all of the attendant wives, maids, cats, kittens; the complexity within complexity is daunting.
See the collected works of Rhody, H. on fractal complexity.
In fact, this series, plus a few sidebar mindbenders of Hank’s has got to be one of the finest reasons for being on Ricochet. This absolutely must have some kind of preserved life beyond even this venerable website. It’s already book length; you gotta make a book.
Then once you get the hardware up to the point where it’s actually a computer, the same thing starts all over with the software. Layer upon layer upon layer…
(leans back in the rocking chair, tugs thoughtfully on a corncob pipe. Distant sound of a hound dog barking.)
“Why, son, back in my day we didn’t mess with all this complexity. We used Nixie tubes! Just put a volt into pin 7 and the number 7 lit up.”
When I started this series I had the ambition to follow the fractal all the way down. Turns out that was just as foolish as it sounds.
Hank’s night club is a unique experience. The Moebius strippers are simultaneously clothed and unclothed. Every bottle behind the bar is a Klein bottle, each of which is both inside and outside of all of the rest of the bar, including all of the other Klein bottles. And don’t get me started on those M.C. Escher staircases.
This takes me right back to my sophomore ‘Digital Logic’ course in college. I think this was the second or third homework assignment we did.
Nice job using Excel to illustrate the process, BTW.
We were promised “how to” for modern digital computers, instead we are getting chintzy 35 year old “what for” LED wrist watches. –NYTimes review
I still miss my old flip clock. I got one after visiting the recently-opened Dulles Airport and seeing flip clocks everywhere you looked. It was my first encounter with digital timepieces.
How the heck did this egg-headed drivel ever get to the main feed? -NYTimes Review
Early 60’s. Did they have LED driven displays back then?
My first time to Dulles was in 1972′ for the Transpo Exhibition. Even then we had fantasies on doing high speed trains.
I’m sure they would have used LEDs for the clocks had they been available. Keeping all those electromechanical flip-clocks synchronized and running must have been quite a job.
I remember the long ride out to the new airport on the almost-deserted four-lane access road. The surrounding countryside was pitch black until you suddenly came upon that glowing Saarinen spaceport sitting there alone in the middle of nowhere. Yes, people actually drove to Dulles just to see it.
Seven Days in May, filmed in 1963 and released the following year, has a scene at Dulles that plays up its futuristic look. Even forty years later it was still pretty impressive. I haven’t seen it in a while.
I remember the futuristic Dulles phone booths were shown in the movie. Next time I watch it, I’ll have to keep an eye out to see if any of the flip-clocks are visible.
Still has the cool looks factor, but it is a PITA logistically, both to get there, and getting from the checkin to the remote gates. I won’t use the place unless it has a super deal ($$) on oversea travel. Dulles was designed in a more civilized era still tied to traveling in one’s Sunday best and at a more leisurely pace. It has not done well in the post deregulated frenzy unleashed by Alfred Kahn.
Interior view of a commercial passenger plane shows, in the foreground, a couple as they enjoy their meal next to a smiling elderly woman, while behind them, a flight attendant pours a glass of wine for a man who sits next to a couple who toast each other with full glasses, 1950s. (Photo by Frederic Lewis/Getty Images)
First Jet Service
NEW YORK – MID 1950’s: An air hostess chats with passengers on a Transocean Air lines Boeing 377 Stratocruiser in the mid 1950’s. Transocean Air lines flew between 1946 and 1962 and was a pioneer discount airline. (Photo by Michael Ochs Archive/Getty Images)
Well, if you like to see ugly architecture, Eero was your man.
Some of it may have been ugly, but he redeemed himself at the finnish.
So, so bad.
So, there was a clever pun involved? I don’t get the reference, but I wondered.
I wouldn’t say clever, but it was a pun. Eero Saarinen was Finnish. His father, Eliel, was a good architect.
Everyone’s a critic.
A good flip clock shot: the opening montage of Rocky III, set to “Eye of the Tiger”. It’s also just a damned good, clever montage, using real shots of Sylvester Stallone’s early years of fame to depict Rocky Balboa’s rise.
You want to talk about flip clocks?
Let’s get back to technology: