This google site will serve as a portfolio for my projects for Intro to Digital Systems. The projects will range from simple proofs of concepts to some more complicated devices with practical purpose.
My first project is a half adder made using only NAND gates. A half adder is a relatively simple concept, and using NAND gates, we only need one type of logic chip for our circuit. The point of making a circuit with only NAND gates is to make the circuit simpler to construct, and possibly cheaper if purchased in bulk, because you would only need the one type of chip. In the case of this half adder, I needed two Quad NAND 7400 chips.
The least efficient part of this project is the construction of an exclusive OR gate with NAND. An XOR gate's logic is roughly
(AB')+(A'B)
Which, with NAND, looks like
((A(AB)')'(B(AB)')')'
This uses up all of the inputs on a Quad NAND gate chip, so, to add logic for AND, we need to add a second NAND chip just for the 1 AND function.
This circuit uses
4 220 Ohm resistors
2 7400 NAND chips
1 4-input DIP switch (You will only use 2 of the inputs)
2 LEDs (color doesn't matter)
6 red jumper wires
4 black jumper wires
12 misc-colored jumper wires
Above: CAD model using parts (LEFT). Circuit schematic (RIGHT).
Below: Circuit Diagram
My second project is a binary calculator that can perform two functions: addition and subtraction. It switches between the two using a toggle switch to change the form of its second input. This change uses two's complement to change the sign of the second value with an XOR gate and use the switch's value as a Carry-In for the adder, making the number negative.
Left: Circuit Diagram. Right: Picture and assembled CAD model.
This circuit is as streamlined for its purpose. The parts list is as follows:
13 220 Ohm resistors
1 7486 XOR chip
1 74283 Adder chip
2 8-input DIP switches (8-input switches were all I had on hand but you only need 9 total switch inputs)
4 LEDs (color isn't important)
12 red jumper wires
3 black jumper wires
20 misc-colored jumper wires
I went into this project not quite understanding parity. I understood that signals could lose their strength over a distance, but I didn't know how parity could detect this loss.
An even parity generator uses a 3-input XOR gate to determine whether the number of 1's in the 3-bit binary number is even or odd. It adds a parity bit onto the end that will be a 1 if the number is odd and a 0 if the number is even. These numbers can be passed to a parity checker that will check each bit with it's own XOR function. If the number of 1's is odd but the parity bit is a 1, then there has been some loss in signal integrity, and an error light will illuminate.
This circuit is made using
8 220 Ohm resistors
1 4-input DIP switch (Only 3 inputs will be used)
2 7484 XOR chips
5 LEDs of any color
6 red jumper wires
3 black jumper wires
14 misc-colored jumper wires
I made this project because I like ROM, and wanted to utilize it in my portfolio projects. I found that a nice way to utilize a single UVEPROM (Ultra-Violet Erasable Programmable Read Only Memory) chip to make a special decoder for a seven segment display, that would fully display 16 digits. The decoder displays values 0-9 and A-F to cover every value possible for 4 bits of binary.
This project was not without its issues. Primarily relating to the pinout of the 27C010 @DIP32 ROM chip that I was using. To come up with the special programming for the 7-segment display, to use 4 inputs and 7 outputs, meaning that we need to exclude 1 output from our calculations. So, a part of programming the ROM chip was which of the 8 outputs I wasn't going to use. In order to program the ROM chip, I need to convert 8 binary bits into 2 hexadecimal bits. For example, 0010 1101 is 2D. Needing 7 outputs, we can make one of them read LOW regardless of input by setting its value to 0 in our group of 8 binary bits. It is easiest to do that with the output Q7, and that means that we will need Q6 through Q0. Factoring that into the calculation, we had 8 outputs.
https://www.tinkercad.com/things/kuUgbWwNl2j-updown-counter/editel
My next project involves using the concept of counters made with T-Flip-Flops. I wanted to make a counter that would simply count up from 0 to 15 and loop back. That's simple, so I remade it with more functionality. I derived equations for a switch that could be put in to allow for the counter to switch between counting up and down. This is visualized in binary using 4 LEDs. The biggest issue that I faced was that tinkerCAD doesn't have exactly the chip I was initially looking for, so I had to use one that has an active LOW reset instead of active LOW preset and clear.
https://www.tinkercad.com/things/fgw83xcDaNX-led-sequencer/editel
My third project is something called an LED sequencer, or an LED chaser. This is a line of LEDs that will light up, and then turn off, one at a time, in a row. This is best accomplished with a decade counter, because I want to have 10 LEDs, and a decoder (or logic for a decoder, because tinkerCAD doesn't have the right chips.) Ideally, I would make my decade counter and hook it into a 4-line to 16-line decoder to display the individual outputs on 10 different LEDs. Instead, I had to make custom decoder logic, using several Dual 4-input AND gates and a hex inverter to come up with the logic for what would be outputs 0(A'B'C'D') through 9(AB'C'D).
For my next project, I wanted to make something visual. I wanted a circuit whose function was visually clear, and I also wanted to do something with RGB LEDs. So I constructed a Moore machine to do this, using T-flipflops to make a machine that could cycle through each color possible on the RGB LED.
To make this work, I needed to construct a state machine that could cycle between every color on the RGB LED using the input of two switches. In order to activate each color, we need three outputs. I'm excluding white because I want a color wheel, so one or two outputs will be hot on any state. https://circuitverse.org/simulator/embed/rgb-cycle-machine-e235307a-e649-4404-8634-52e1c9f824f6
Utilizing LogicAid, we were able to calculate some clean T-flipflop equations and output equations for our state machine. Now we have a well-functioning circuit that cycles through Red-Yellow-Green-Cyan-Blue-Magenta-Red when XY is 01, and cycles the opposite way when XY is 10. When XY is 11 or 00, however, it stays in place.
The idea for this next project came to me while I was trying to find a charger for an old RC helicopter that sits in my room collecting dust. The practical purposes of MUX and DEMUX are somewhat obscure to me, but I wanted to make a project that would involve them.
Now, I want to clear up that this is mostly conceptual in nature, but I was thinking that, If you need to transfer some amount of data from one place to another, you might find that in some cases, you have a 6 bit output in one spot and an 8 bit input in another, and you need to transfer a part of the output into the input, or the whole thing, without just grabbing a bunch of wires and cramming them in there, not to mention grounding unused pins and finding out which orientation to shove them in at.
This concept runs 6 bits through a MUX and then through a DEMUX, to change from having 6 bits to 8. Now, using MUX and DEMUX in this way means that we can only send 1 bit at a time, but we can consider that to be delay in transfer as it doesn't necessarily stop us from getting the 8 bits of output that we want. We could, for example, use a Parallel In/Parallel Out Shift Register to store the values and read them all off once the work is done, but first we must address another issue.
For this to work, we need a way to cycle through all possible values for our 3 control bits. The easiest way to do this is with a counter that will count from 0 or 000 to 7 or 111. This way we will transfer every bit from our 6-bit input. The clock for ticking this counter can be as fast as we want the 8-bits in.
Brief Aside: In the case of a real physical product, maybe this could be adjustable with a dial and a variable resistor, that could change the value of the resistor in our clock circuit that will be controlling this whole adapter.
Then, we can take our 8 output bits and run them through a SIPO (Serial In/Parallel Out) Shift Register that can read the data bit-by-bit but transmit it all at once.
All this being said, this isn't a project about counters. It's merely an exploration of the MUX/DEMUX interaction.
So, for this we'll need to make a 6 to 1 MUX. 2^n bits means we need n control bits for the MUX system. Since we have 6 bits, we'll need to round up to 8, which means 3 control bits. We can use these control bits for the DEMUX too, since we want an output of 8 bits.
The rough diagram to the right is what we're looking for, assuming we had to build this system using only 2-to-1 MUXes, for the sake of clarity.
Then we can take each signal and OR them together to force them to become a single serial signal. We can take this serial signal and feed it into a SIPO shift register made using D-flipflops, where the previous signal feeds into the next flipflop. Our product will look like this. Now, we have a way to turn 6 bits into 8 bits using MUX and a shift register.
So, the way that I made it, the signal will be transmitted from MUX to DEMUX, on time with a counter, and the signal bits can be deposited into a SIPO shift register at the push of a button.
Taking a break from the world of MUXes and putting serial signals into parallel forms. Let's move on to some traditional mathematics. I've already made a tool to solve addition and subtraction using circuits, but what about multiplication? Multiplication in binary is unique because it isn't as simple as using AND gates to do 1 bit multiplication with each term separately. We need to make what could be called a Partial Product Array, which is the step in multiplication when you have several digits in each term, so you calculate the value of each term with multiplication, or an AND gate in this case, and then add them together, shifted by 1 bit for each additional term. So, we can make a multiplication calculator using a series of full adders, half adders, and AND gates.
I'll be using 3 bits for multiplication, instead of 4. This means that our output will have 6 bits instead of 8.
Let's now look at another use of several bits of input. Decoders are great for multiple purposes, whenever you want to take a group of bits and decompress them into something that is quantifiable in decimal, or any scenario in which you need to address 2^n different possibilities but only have n bits of input. You may find yourself needing a 5 to 32 decoder, but that is a lot of pins to work with. You probably won't want to try fitting that into one chip, so instead consider making it out of smaller input and smaller output decoders, like 3 to 8 decoders, which are much smaller and easier to fit into a board.
n = 5
2^5 = 32
To make this work, we'll need some 3 to 8 decoders, and a 2 to 4 decoder for the first part of it. It should look like this image on the right, using the first 3 bits of the decoder input for the three inputs for each of four 3 to 8 , and using the 4 outputs of the 2 to 4 decoder as enable bits for each of the 3 to 8 decoders.