Basic knowledge of digital technology

digital technology My interest in digital technology started around 1970, but this was still in its infancy state at that time. The first digital calculators were just on the market and were very expensive and computers were machines that were huge, very large and unaffordable. During this time I bought my first book about digital technology and it clearly stated the basics of zeros and ones, and, or and not gate and how flip-flops and counters work. Everything with resistors diodes and transistors. It was funny that this knowledge has proved very useful to me throughout my career. On the technical school we still built flip-flop circuits with transistors and connected them in series to make a digital counter. We also had to learn binary logic and elaborate and simplify complex digital logic schemes. On the other side of the world, clever minds were developing the first microprocessors with the same technology. My first computers were real DIY projects and later I worked on developing computer hardware and interfaces for many years. Again and again everything came down to basic knowledge of digital technology and I feel that I had to share this knowledge. Kind regards, Hein Pragt.

Electrical zeros and ones

Electrical zeros and ones Digital circuits work with zeros and ones, where we can say, for example, that a positive voltage a 1 and no voltage a 0. As an example we can take a battery with a switch and a lamp. When the switch is open there will be no current flowing and the lamp will not light up, this can be defined as 0 or low. When we close the switch, current will flow and the lamp will light up, we can define this as 1 or high. Thus, by opening or closing the switch we can generate logical zeros and ones. By combining several lamps (or LEDs) and several switches, we can already build a simple digital circuit. We often still often use a LED to display a logic state in an electronic circuits.

TTL levels In practice, we usually work with a voltage below a certain value to be a 0 and a voltage above a certain value to be a 1. To make the difference clear, there is a so-called forbidden area between these threshold values that should not be used. As an example, we use here the TTL logic that operates on a supply voltage of 5 V. A TTL input recognizes a logic 1 at a voltage of at least 2.0 V and a logic 0 at a voltage of at most 0.8 V. The area between 0.8 and 2.0 volts is the so-called forbidden area. Older computers were often largely made up of these TTL chips. Another type of chips are the CMOS chips, these have a wider power supply and they define 0 as 0 to 1/3 of the supply voltage and 1 as 2/3 of the supply voltage. Here too, the area between 1/3 and 2/3 of the supply voltage is the forbidden area. So by means of make electrical voltage (and therefore electrical current) we can define a logical value of 0 or 1.

There are only three basic components that can be used to make all digital circuits, including complex ones microprocessors and those are the AND, the OR and the NOT gate. I will describe these components first. Also I will show the logic symbol, the truth table (table with input values ​​and corresponding output values) and the new official schema symbol that I unfortunately (like many with me) can't get used to. For many years we used the old logic symbol for all gates in schematic drawings so that you could see at a glance how the circuit was put together, with the new symbols I first have to look inside the symbol what it does and that is not so clear. I think many people agree with me because even in many new schemes I still see the old logical symbols. But it's good to be able to read the new symbols as well.

The AND gate

The AND gate contains a number of inputs and one output, only when ALL inputs are high (1) the output will also be high (1). In a formula we write the AND gate as: X = A.B or X = AB. Below are the old scheme symbol (the logic symbol), the truth table and finally the official IEC symbol.

and gate
and gate truth table

The OR gate

The OR gate contains a number of inputs and one output, when ONE or more inputs are high (1) the output will also be high (1). In a formula we write the OR gate as: X = A + B. Below are the old schema symbol (the logic symbol), the truth table and finally the official IEC symbol.

or gate
or gate truth table


The INVERTER contains one input and one output, when the input is high (1) the output goes low (0) and when the input is low (0) the output will be high (1). In a formula we write the INVERTER gate as: A = X. Below are the old schematic symbol (the logic symbol), the truth table and finally the official IEC symbol.

inverter gate
inverter gate truth table

Now I should really write a thousand times, "I'm not allowed to tell half-truths!", because there are two more commonly used components, which are actually a combination of two (or even more) of the above components, but they are used so often that they have their own symbol. These components also occur as a (merged) component in ICs.

The NAND gate

The NAND (not and) gate contains a number of inputs and one output, only when ALL inputs are high (1) the output will be low (0). In a formula we write the NAND gate as: X = A .B. Below are the old schema symbol (the logical symbol), the truth table and finally the official IEC symbol.

nand gate
nand gate truth table

The NOR gate

The NOR (not or) gate contains a number of inputs and one output, when all inputs are low (0) the output will be high (1). In a formula we write the NOR gate as: X = A + B. Below are the old schema symbol (the logical symbol), the truth table and finally the official IEC symbol.

nor gate
nor gate truth table
nor gate IEC symbool

With combination of these logic components, we can create any complex logic circuit (such as adders circuits, etc.). In the above examples, the gates have only two inputs, this number of inputs can also be more, there are even ICs with AND gates with up to 8 inputs. We can also gate with two ANDs with each two inputs realize an AND gate with three inputs. Check if you understand this, this is essential to understand complex digital circuits. This seems a bit cumbersome, but often ICs have, for example six AND gates on board and using two AND gates with two inputs is more efficient and cheaper than adding an extra IC with AND gates with three inputs.

The 3 x AND gate

Here is an example of a single AND gate with three inputs and its replacement with two smaller AND gates with two inputs each.

3 input and gate
3 input and gate truth table


The next complex gate is the Exclusive OR gate. This is a fairly complex building block that you can also use as an IC with a few nember of these building blocks. This exclusive OR function is the main building block of a circuit which can add two binary numbers. The gate only gives a high (1) on the output if only one of the inputs high (1). When both inputs are equal, the output is low (0). In the IEC symbol block, this gate is indicated with an = sign which seems a bit illogical. But given my criticism of these signs, this matches nicely. The XOR gate is also called logical difference but also "half adder" with which a adder without carry. This is a precursor to the real addition circuit that we will discuss next.

xor gate
xor gate truth table

I mentioned earlier that this kind of complex gates can be built up (and usually are really built up internally) with the three standard logic building blocks, the AND the OR and the INVERTER. Below is the schematic of an XOR gate but constructed with the three standard logic gates.

xor gate opbouw

The logic ADDER

We now go to a lot more complex basic building block of a processor in the form of an adder of two 4-bit numbers. Adding two bits is relatively easy, a 0 plus a 0 is 0, a 0 plus a 1 is 1 and a 1 plus a 1 is 10. So there is a 0 with 1 remembered (carry) and we have to "add" this carry bit when adding the next two bits again. The following logic circuit can add two bits together taking the carry in account and generate a carry out. Take a good look at this logic circuit and try to understand it before you read on.

adder logische schakeling
adder truth table

When we put four of these blocks together we can make a four bit adder where we use the carry to pass the overglow to the next block. For very large binary numbers, this is rather slow because in certain cases the carry must run through all gates, therefore in a real processor often several 4 bit adders are added next to each other and then put together. In a processor one does not look at one logic gate more or less, the speed is usually more important.

4 bit adder logische schakeling


Another commonly used complex logic circuit (also available as a standard IC) is a multiplexer. These are also widely used within a processor. When we have two input lines and we want to alternate look at one of the two sets, then we need some kind of switch. By means of the select line we choose whether we connect the first set of inputs to the outputs or the other two sets of inputs. See also how useful the inverter is in the select line that will ensure that only one of the two sets of inputs will always be selected, and never both at the same time. This block also exists as an 8 bit multiplexer version, only the number of connection pins increases enormously. We can also use two 4 bit multiplexers parallel to make an 8 bit multiplexer.

2 bit multiplexer


Another common chip is the decoder that is common used within a processor or computer. An example is a two to four decoders. With two bits, four different combinations of bits are possible, when we use these four combinations want to translate to four output lines, we can do this by means of a decoder. Another well-known example is the four bit to seven segment decoder (also available as a single IC) that converts a four bit value to a number on a so-called seven segment display values.

2 to 4 bit decoder

Exmple seven segment display.

seven segment display digits
seven segment decoder

The magic of Flop Flops

When I was in high school learning electronics and digital circuits, we got some resistors, transistors, capacitors, diodes and a breadboard to make a Flip Flop circuit. I was amazed by this and soon I learned all about all types of Flip Flips and how to use them in digital computers. But what are flip flops in electronics? Basically a flip-flop is an electronic circuit that can store single-bit binary data either logic 0 or logic 1 and basically, a flip flop is a Bistable multivibrator that changes its output depending on the input levels. Flip Flops can be edge triggered or level triggered, the state of an Edge triggered flip flop changes during the positive or negative (falling) edge of a clock cycle and in the case of level-triggered flip flop output can change real time. A Flip Flop can be used as a divide by two element but also al a so called latch that basically is a one bit memory element. A Flip Flop can be made out of standard logic components like AND / OR / XOR ports and Inverters. A combination of these element can make a Flip Flop circuit and there are some major versions that I will show you and that are used often in many digital electronic designs.

SR latch

The basic elements of a Flip Flop is a SR Latch (set / reset latch), this a simple logic circuit that has two outputs of witch only ONE can be high (active) at one time. If Q is high (active), ~Q will always ne low and the other way around. The two outputs can NEVER be high (active) at the same time. Also if the circuit is in one state it will remain in that state until one of the inputs is activated. SO it is a kind of memory element, it stays in the state it is set to. We will find this element in the hearth of all other types of Flip Flops.

SR Flip Flop

SR Flip FLop

In a SR flip flop we see out basic SR-Latch at the right side but on the left side we see that this is proceeded with two extra NAND gates at the inputs that are connected with a clock signal to make it an asynchronous sequential circuit. The Set or Reset is only transferred to SR-Latch during a clock pulse and the SR-Latch will keep the circuit in the same state when there is no clock pulse.

SR latch

JK Flip-Flop

JK Flip FLop

One problem with the SR Flip Flop is that when both inputs are high when the clock pulse appears the outputs will have an undefined state. The JK Flip Flop is an improved version of SR Flip Flop, the problem of the undefined state of the outputs of the SR Flip Flop is solved in the JK Flip Flop. In the JK Flip Flop, if both inputs are high at the clock pulse the output gets toggled with respect to the previous output. In the JK Flip Flop we see the same NAND gates as in the SR Flip Flop, but now they have three inputs and the outputs Q and ~Q are added to the logic of the NAND from the opposite side.

JK Flip Flop

T(Toggle) Flip Flop

T Flip FLop

A T flip flop is actually also another version of a JK flip flop, the only change is that both the input are connected to both the NAND inputs and also the clock signal connected to both the NAND inputs. The output of the T flip flop remains unchanged when both the inputs are the same. When T and CLK are different the output gets toggled or complemented, this explains the name T flip flop.

T Flip Flop

D(Data) Flip Flop

D Flip FLop

Another type of common used Flip Flops are D flip flops, these are very popular in Digital Electronics and widely used in counter circuits and shift registers. In this flip flop, there is a not gate present between inputs of JK flip flop, so its is a JK flip flop with only one input and a clock.

D Flip Flop

Flip Flops are the basic building blocks of many Digital electronics circuits and microprocessors are made up of a lot of these circuits. Flip Flops have a lot of applications and this is a short overview. Flo[ Flops are used in counters, shift registers, storage registers, frequency / clock dividers, debounce circuits, memory elements and latches. Some integrated circuit IC’s contain an array of these Flip Flops f.i. there is a 8 bit latch with an extra enable pin that can store an 8 bit value between cycles, there are IC’s with two to four Flip Flips with extra reset pins to act as a counter, you will find them in any computer design.

Short stoy

Years ago I was asked to help a young electronics designer with a complex digital design. He was trying to get the whole circuit as efficiently as possible in a number of TTL chips. He told me that he had one problem, he needed one more OR gate and this would cost the space and money of a whole chip containing four of these gates. Then I told him: “why not use two small diodes to create that OR gate”, and he looked at me with confusion. I told him that in early DDL logic a OR gate was made with two diodes and when I explained it he was exited. He never learned the old digital building blocks at school, like we did. Sometimes a little knowledge of old technology may be very handy.

Rebuild DEC H-500 Computer Lab

DEC H-500 Computer Lab I have enjoyed working with the products of Digital Equipment Corporation (DEC) for many years and the great PDP line of computers were in that time unparalleled. In addition, they also made a digital lab kit with which people could design digital circuits themselves with logic and put it into practice to test. On the website instructables someone has completely rebuilt the H-500 Computer Lab with partly more modern hardware, but the original housing. Launched by DEC in the late 1960s, The H-500 was part of a COMPUTER LAB curriculum to introduce students and engineers to do with digital electronics. The machine itself came with a beautiful comprehensive workbook covering a complete course in digital electronics. This one kit was intended to guide courses in binary arithmetic, Boolean algebra, digital logic or computer technology. By means of patch cables logic gates, flip-flops, switches, lights and a clock generator can be connected together and one example is a counter that can count in binary and display the result on lights (nowadays LEDs). I thought this was a fantastic design and an even nicer rebuild. Below is the link to the site where you can find complete building instructions and some demonstration videos.

Ga naar:

Last update: 22-05-2022

Disclaimer: All pages on this Web site are copyrighted by Hein Pragt, unless otherwise noted. I strive for accuracy but cannot be held responsible for any errors in the content. For questions about the content of this site or persmission to copy you can contact me at: (email: is registered under KvK number: 73839426.