Logic Gates: The Blocker
How do computers work? Imagine a wire. When electricity enters one part of the wire, the other end has electricity. This means you have a wire, and if you put a ‘1’ in, you get a ‘1’ out. If you put a ‘0’ in, you get a ‘0’ out. Zero means the electricity is off, and 1 means the electricity is on.
Binary Code from Wires and Cycles
Computers work by controlling this flow of electricity. Computers cycle millions or even billions of times per second. For example, a 1 MHz computer (one megahertz) cycles at 1 million times per second. So, during each cycle, the computer can count a zero or a one. If the wire is ‘1’ during the cycle, the computer sees the number ‘1’ and records it. If the wire shows ‘0’ during that cycle, the number is recorded as zero. So, if the computer cycles four times, and shows “1001”, what number is that? The first digit is 1×1, the second is 2×0 the third is 4×0 and the last one is 8×1:
- 1 x 1
- 0 x 2
- 0 x 4
- 1 x 8
What’s 1×1 plus 1×8? It’s 9. So in binary code, 9 is 1-0-0-1. That’s how you count in binary.
Blocker
One of the most basic computer circuits is a blocker. A blocker is a wire that when you put a 1 in, shows 0, and when you put a 0 in, shows a 1! It is the opposite of a normal wire. It looks like this:
1 2 3 4 5 6 7 8 9 10 11 |
a 1 | | | | | ____|____ | | | |_____| blocker | | | |_________| | | b |
In this diagram, the input is a, and the output is b. The ‘1’ represents a power line in from somewhere else. The only important idea here is the input ‘a’ and output ‘b’. In a normal wire, when power is on ‘a’, ‘b’ also shows power, and when there is no power on the line (0) at a, then b also has no power. But here, when a is 1, the signal is blocked, and b is zero. Yet when a is zero, the power is allowed to flow across the blocker.
An example of this is a trap door. When the door is closed, the wire is connected from the door to the doorframe, and the trap is off. When the door is opened, the blocker opens and power flows through to the lion trap and the lions turn on and attack.
Filed under: Logic Gates - @ July 26, 2022 8:05 am