Logic gates are the backbone of computer science. They take 1-bit binary inputs (1 or 2) and outputs another 1-bit binary number.
AND, OR, NOT
AND, OR, and NOT are what I consider as the Big 3 of logic gates.
AND
An AND gate is a 2 input gate, meaning it requires 2 inputs. The AND gate checks if both inputs are 1, if so, outputs 1, otherwise outputs 0. The following is the truth table and block code for the AND gate.
The NOT gate is special: it's one of 2 gates that only have one input! (the other being BUFFER). The NOT gate acts like an inverter. It outputs the opposite of the input. The following is the truth table and block code for the NOT gate.
Aaand, that’s about it for Chapter 1, Part 2 of building a 16-bit computer in GKC! Today we built the main 7 logic gates in block code, and I also gave a truth table and an explanation for each (mostly…).
Not exactly, logic gates take 2 binary inputs and outputs 1 binary output. They’re named logic gates for a reason, they are based on logic. For example, the AND gate outputs positive if A is positive AND B is positive. (0 is negative 1 is positive btw)
Wow, you are working fast! Good job.
A few things:
XAND is not the standard name for the gate you described(which happens to be an inversion of the XOR gate). Instead, it’s called an XNOR(exclusive nor) gate.
Maybe explain how some gates can be designed to take in multiple inputs(besides just 2), and some others can produce more than 1 output.
Maybe you could expand on the NOR and NAND gates to say how they’re universal gates(capable of recreating any other gate using multiples of such gate).
I noticed confusion on the Q variable, so maybe explain how that is the output you’re using? (also explain inputs and outputs and their differences and relationships in regards to logic gates, and also connect this to the computer to explain it more in-depth)
I think adding more in-depth explanations for each logic gate could be helpful, but I think it’s pretty good overall.
ik XAND and XNOR are equal, i thought that the idea of an exclusive inverted gate would throw some people off. I wasn’t going to talk about NAND being universal because this is mostly just an introduction to logic gates.
The title says: make a 16-bit computer… and that means you’re helping others learn how to make one, so I guess it’s a guide, unless you change something.
Just so everyone knows, I will be making a slight change (not really), the computer will now be 4 bit sized. This will make it much easier to make and hopefully will be able to fit better in terms of memory