Skip to main content

DESIGNING A RELAY COMPUTER: Relays

In the previous posts I highlighted the various concepts that are fundamental to designing a computer. Now I think its time to mention the ways of practically applying these concepts to design a computer. The first thing I should highlight is that I will not be using transistors, I'll be using relays. This is due to the fact that its easier to understand how a relay works than to understand how a transistor works.
Also, this seems to be the easiest way to understand how computers actually work since we are using mechanical switches instead of solid state switches (transistors).

What is a Relay??

Relays are basically electrically controlled switches. Inside a relay is an electromagnet. when the electromagnet is powered, it attracts a metal strip that in turn operates a switch.
Most widely available relays are SPDT relays or Single Pole Double Throw relays. In these relays the switch has 3 terminals- Common terminal , NO i.e. normally open terminal and NC i.e. normally closed terminal. when the relay coil is not energized the Spring pulls the switch armature to allow current to flow between the 'Common' and NC terminal and NO terminal does not conduct.
When the coil is energized the magnetic force attracts the armature to allow conduction between the Common and NO terminal.Using this relay as a basic switching element I plan to build the whole computer.
For operating the relay we require 12 Volts, hence, for logic state representation we will consider 12V as state "1" and 'No Connection' as state "0".
To make the circuit diagrams simpler I will be using the following diagram for the relay:
In the diagram the coil is represented by the green block and the downward arrow represents ground or 0V. For ease of understanding I will be using the same diagram for all relay circuits.

AND Gate using relays:

So, this is how you can make an AND gate using 2 relays. At the first look itself you can see that the output 'Z' will be connected to 12V only when both X and Y are ON. So, its an AND gate, plain and simple.
You can also try to compare it with the table:




OR Gate using relays:

This is the OR gate circuit using 2 relays. Z is connected to 12V if either of the 2 inputs X or Y are ON.






NOT Gate using relays:

The NOT gate needs only 1 relay. In this Z is OFF when X is ON and vice-versa.




XOR Gate using relays:

This gate looks a bit awkward in the first glimpse, but upon a closer look you will notice that Z is connected to 12V only when one of the inputs is ON and the other is OFF. If both inputs are ON or both inputs are OFF, Z stays disconnected.






In the next post I will try and explain adding circuits using relays.
Till then...

Got any queries??? 
E-Mail me at: shashwath.sundar@gmail.com

Comments

Popular posts from this blog

Making a URISC Processor: The Idea

So a while back I saw this video on Youtube by "Gary Explains" talking about a "One Instruction Set Computer". For those who do not know, a computer processor does a fixed set of things or follows a fixed set of instructions. Usually modern processors have hundreds of instructions. In the OISC or URISC (Ultimate Reduced Instruction Set Computer) processor the idea is to have one universal instruction that the processor executes that allows the programmer to write any program. The first time I heard of this idea I fell off my chair with excitement (Literally). My mind was really blown by the fact that you could write any program with just one instruction. So after going through what "Gary" on Youtube had to offer... I sat down and tried to come up with a design of this hypothetical processor that executes only one instruction. In the video Gary talked about a processor that executed an instruction called 'SUBLEQ' which simply means, SUB tract and th...

Making a URISC Processor: Micro-Instruction Encoding

 In the last post I described the micro-instructions that are to be executed to execute the SUBNEG instruction. Given below is the table I had posted previously: I realized later that it still might not be entirely clear as to how this was working so I have made a GIF of the same to better explain how the "Subtraction" instruction is executed. Pretty cool huh?.... no??? okay 😢 In The GIF it is assumed that the following data is stored in the RAM: Address    Byte #0000           #32  [B(l)] #0001         #00  [B(h)] #0002         #33  [A(l)] #0003       #00  [A(h)] #0004       #20  [C(l)] #0005       #01  [C(h)] #0032         #07 [Data] #0033       #09 [Data] The next thing we need to do is try to optimize this process. In the above GIF you may or may...