Drawing Digital Circuits - Engineering - ثاني ثانوي
1. Engineering Fundamentals
2. Electrical Engineering
3. Digital Circuits
4. Circuit Simulation with Tinkercad Circuits
5. Simulating a microcontroller- based system
Lesson 3 Drawing Digital Circuits Core Hardware Components of a Digital Circuit Digital circuits are built with the following core components: > Conducting wires or traces, which connect all the components in a circuit. Current direction is guided with the use of diodes. > Transistors that switch digital signals between the Boolean values 0 & 1. > Logic gates, which are special arrangements of transistors that implement Boolean logic in the circuit. These are combined to create components that implement more complex logic. The 2 main types are: • Adders, which implement the basic numerical operations of addition, subtraction, multiplication, and division. Flip-flops, the fundamental components of computer memory, which store inputs and outputs. Diodes Diodes are semiconductor components that conduct and direct electric current in a single direction. They consist of two terminals, an anode and a cathode, and have negligible resistance in one direction, and high resistance in the opposite direction. They therefore direct the current flowing through them in one direction. Terminals of Diodes Cathodes are electrodes that divert current away from the component that they inhibit. Anodes draw current towards the same component. The polarity of these two electrodes allows them to divert and control the flow of electric current a circuit. plat a point in a Ministry of Education 88 2024-1446 GND Input Input SVRR Input Figure 3.1: Electronic components Link to digital lesson www.ien.edu.sa (2)
Core Hardware Components of a Digital Circuit
Some of the most common uses of diodes include: > Converting Alternating Current into Direct Current in a rectifier. > Building simple logic gates (AND, NOT, OR). > Recovering and decoding radio signals through demodulation in radio receiving devices. > The production of LED lights (light-emitting diode). These diodes emit light when an electric current flows through them. 000 dBuv The basic diode types are: T67237 Figure 3.2: DC voltage graph Signal diodes Power diodes LEDS Schottky diodes Zener diodes Photodiodes Transistors Transistors are one of the most important inventions of modern technology. They are semiconductors that can switch and amplify signal inputs. They were invented in order to replace vacuum tubes because they had two significant advantages. They are very small in size relative to vacuum tubes, which means that they can be embedded in digital and integrated circuits. They also consume much less power, which makes them a more cost-effective and energy-efficient alternative to vacuum tubes. Transistors are the basic building blocks of complex logic gates. Vacuum tubes وزارة التعليم Ministry of Education 2024-1446 -> Transistors Figure 3.3: Vacuum tube and transistor size comparison 89
Some of the most common use of diodes include:
Transistors
Integrated Circuit (IC) If you open an electronic or digital device, you will see small components with a series of pins, called chips or microchips. A microchip is a flat piece of semiconductor material, usually silicon, that integrates transistors, resistors and capacitors. Logic gates are comprised of resistors and transistors, or diodes. By joining a variety of logic gates, the circuit can perform simple or complex operations. All this digital circuitry is called an integrated circuit (IC). 833333333333 C88 pm][C92 વસ ખા 2 40 16 416 CZAC73C72C71 www C70 .83 Figure 3.5: VLSI packaging The integrated circuit is the building block of all modern electronic and digital devices. The integrated circuit is orders of magnitude smaller, faster, and less expensive than a circuit constructed of discrete electronic components. But, the high initial costs of design and preparation require high production volumes to keep the cost per chip low. Figure 3.4: Typical IC packaging Based on their design and the number of transistors per chip, integrated circuits are categorized as: > Small Scale Integration (SSI): Up to ten transistors Table 3.4: Integrated Circuit Scale of Integration Number of Transistors > Medium Scale Integration (MSI): Tens to several hundred transistors SSI 1-10 > Large Scale Integration (LSI): Several hundred to tens of thousands of transistors MSI 10 - 500 > Very Large-Scale Integration (VLSI): Tens of thousands to a million transistors LSI 500 - 20,000 VLSI 20,000 1,000,000 > Ultra-Large-Scale Integration (ULSI): Millions to billions of transistors ULSI > 1,000,000 An integrated circuit can also be classified as being digital, analog or a combination of both. Its primary objective is to embed as many logic gates as possible as well as other digital circuitry on a single semiconductor chip. A computer's CPU is a type of integrated circuit and a modern CPU may embed hundreds of billions of transistors. وزارة التعليم Ministry of Education 90 2024-1446 B
Integrated Circuit (IC)
If we could open a simple IC such as 74LS08, we would see that its circuitry implements four AND logic gates as shown in the illustration below. The actual implementation is done through transistors, diodes and resistors, but the chip's functionality resembles that of the illustration. The schematic shows the actual circuit of just one AND gate. HD74LS08P 3L16 VCC A4 B4 Q4 A3 B3 Q3 *LS08 14-13-12-11-10 G 9 8 Vcc 20 ΚΩ ΣΤΟ ΚΩΣ ΚΩ 120 $2 INPUTS A B 1 2 3 4 A1 B1 Q1 A2 5-6-7 B2 Q2 GND Figure 3.6: The logic gates of 74LS08 IC -> 5 k OUTPUT -Y 21.5 ΚΩ 3kSZ GND Copyright 1988, Texas Instruments Incorporated Figure 3.7: Schematic diagram of one AND gate in 74LS08 Similarly, a CPU consists of billions of logic gates to perform arithmetic and logic operations and to temporarily store data for processing. وزارة التعليم Ministry of Education 2024-1446 Figure 3.8: Magnified images of a typical CPU 91
If we could open a simple IC such as 74LS08, we would
Logic Gates on Multisim Live Untitled Circuit i Interactive Schematic Grapher Split a 1127 All the logic gates are located inside the Digital tab on the components toolbar. Digital The Digital Constant can switch between 0 and 1. Operation Logic gate NOT Inverter AND OR XOR AAAAAA NAND NAND NOR XNOR XNOR A A D Digital AND OR NAND NOR XOR Constant وزارة التعليم Ministry of Education 92 ZU24-1446 A XNOR Buffer Inverter Figure 3.9: Multisim Live circuit simulator
Logic Gates on Multisim Live
Drawing Digital Circuits Let's go to www.multisim.com to log in to your account and create a new file. You will create the digital circuit of an AND logic gate. First you will add a switch and name it "A". To add Digital Constant A: > On the Components toolbar, click the Digital tab. 1 > Drag 2 and drop a Digital Constant into the work space. 3 > Change the name of the Digital Constant to "A". 4 1 Digital Digital Constant 3 1 4 A ว 2 A A AND OR ANDY NAND Až A NOR XOR XNOR Buffer Inverter وزارة التعليم Ministry of Education 2024-1446 The Digital Constant produces a strong digital 1 (high) or 0 (low) state. Figure 3.10: Add Digital Constant A SMART TIP A digital constant works like a switch, and you can change its state from 1 (high) to 0 (low) just by clicking the toggle button or by clicking directly on the switch when the simulation is running. ว 93
Drawing Digital Circuits
A digital constant works like a switch and you can change
Then you will add a second switch and name it "B". To add Digital Constant B: > On the Components toolbar, click the Digital tab. > Drag and drop a Digital Constant into the work space. 3 > Change the name of the Digital Constant to "B". 4 i a Interactive Schematic Grapher Split A 0 3 -> 1 4 B ว Digital 1 2 Digital Constant AND A A D A 2/2 4 D OR NAND NOR XOR وزارة التعليم Ministry of Education 94 2024-1446 XNQR Buffer Inverter Figure 3.11: Add Digital Constant B Don't forget, you can always use the duplicate button to add more of the same components. ×
Then you will add a second switch and name it "B".
Now, let's add your first logic gate. To add logic gate AND: > On the Components toolbar, click the Digital tab. 1 > Click on the AND folder. 3 > Drag and drop 2-Input AND into the work space. > Change the name of the 2-input AND to "AND". 5 1 Digital 2 4 D a Digital Constant AND OR NAND AND I 3 P XNOR Buffer Inverter ED- H A 0 B 1 4 Þ C 5 AND < 2-Input AND 3-Input AND 4-Input AND 5-Input AND 6-Input AND 7-Input AND 8-Input AND وزارة التعليم Ministry of Education 2024-1446 Figure 3.12: Add logic gate AND ✓ 95
Now, let's add your first logic gate.
Continue by connecting the AND gate with switches "A" and "B". To make connections: > Click on the Digital Constant A ① and then on the upper input of the 2-input AND. 2 > Click on the Digital Constant B 3 and then on the lower input of the 2-input AND. 4 وزارة التعليم Ministry of Education 96 2024-1446 A 0 1 1 1 B 3 2 4 Figure 3.13: Make connections AND
Continue by connecting the AND gate with switches "A" and "B".
Now we will add an LED so you can see when the result is 1 (high state) or 0 (low state). To add LED: > On the Components toolbar, click the Diodes tab. 1 > Drag and drop an LED into the work space. 3 > Click the Rotation button 4 to rotate the LED into this position. 5 LED A light-emitting diode (LED) is a semiconductor device that emits light when an electric current flows through it. Q 1 बर A 0 1 B Diodes 1 AND 2 2 Diode Zener LED General purpose diodes... 3 A States of an LED (0) LOW (1) HIGH وزارة التعليم Ministry of Education 2024-1446 Figure 3.14: Add LED -> 4 LED1 (X 5 X LED1 97
Now we will add an LED so you can see when the result is 1 (high state) or 0 (low state).
A 1 LED1 0 AND 1 2 Then you will connect the AND gate with LED1. To make connections: > Click on the output of the 2-input AND 1 and then on the input of LED1. 2 B 0 2 Figure 3.15: Make connections Now, let's add a digital probe. To add a probe: > On the Components toolbar, click the Analysis and annotation tab. 1 > Drag and drop a Digital probe in 2 series with LED1. 3 a Analysis and annotation 2 1 VIA Abc 0/1 Voltage Current Voltage and Voltage Current Text Digital Reference Annotation * A * 국 وزارة التعليم Ministry of Education 98 2024-1446 Digital probes can be added to a digital circuit to show us if the value is 0 (low) or 1 (high) at the specific point where the probe is located. A 1 LED1 0 AND PR1 d- 0/1 B 2 Figure 3.16: Add a probe 3
Then you will connect the AND gate with LED1.
Then you will add a ground to your digital circuit. To add ground: > On the Components toolbar, click the Schematic connectors tab. > Drag and drop Ground into the work space. 3 Q Scher connectors 2 1 Ground Connector Junction A 1 LED1 0 AND www PR1 0/1 d― B 1 2 Figure 3.17: Add ground X 3 Finally, you need to connect LED1 with the Ground. Connections: > Click on the output of LED1 and then on the Ground. ② A 1 LED1 0 AND PR1 0/1 1 d- Ground Grounding in integrated circuits is a reference point (0) for measuring voltages. It also serves as a fail-safe mechanism in the event that a fault or damage occurs in the circuit. 1 B وزارة التعليم Ministry of Education 2024-1446 Figure 3.18: Connections 2 99
Then you will add a ground to your digital circuit.
Let's take a look at how the digital circuit works in simulation mode. > In the first example, both inputs "A" and "B" are (0) Low and the output is also (0) Low. > In the second example, input "A" is (1) High, input "B" is (0) Low and the output is (0) Low. > In the third example, both inputs "A" and "B" are (1) High and the output is (1) High. Example A 0 1 LED1 AND PR1 d Lo 0 0 B 2 0 Don't forget, to run the simulation, you need to press the play button. In simulation mode, when the input is in state (1) High and current passes through the cable, its color changes from blue to light blue. A Number 1 LED1 1 means 1 AND PR1 d Lo High state. 0 0 B Number 2 0 O means Low state. وزارة التعليم Ministry of Education 100 2024-1446 Digital probes show (1) High state. The LED state is (1) High, so it emits red light. A 1 LED1 1 AND PR1 d Hi 1 0 B 2 1 INFORMATION When you use digital probes, d Lo = (0) Low and d Hi = (1) High.
Let's take a look at how the digital circuit works in simulation mode.
Half Adder A half adder is a digital circuit that performs addition of numbers. A half adder adds two single-digit binary numbers and the result is a two-digit output denoting the sum and the carry. It has two inputs, called A and B, and two outputs S (sum) and C (carry). The most common circuit uses one XOR and one AND logic gate. If we combine two half adders together with the use of an OR gate, the result is a full adder. A Input B Example Half adder A S B S C 00 0 0 0 1 1 0 1 0 1 0 C 1 1 0 1 1 bit half adder Carry (C) Sum (S) B A 0 0 Schematic of a half adder LED1 XOR 1 PR1 d 0/1 2 LED2 AND PR2 d 0/1 0 0 INFORMATION Half adders and full adders are both digital circuits that are used to implement combinational logic. They are both used to sum calculations. The main difference is that full adders use the carry from a previous calculation as a third input in a 2-bit calculation, whereas half adders ignore any previous values for a carry bit. Full adders are made of 2 half adders and an OR logic gate. طنية التعليم Ministry of Education 2024-1446 101
Half Adder
Half adders and full adders are both digital circuits that are used to implement
Exercises 1 Which are the two types of gates you can make when you combine logic gates? How you can use each one? 2 What is the function of diodes and what are their two terminals? 3 What are the advantages of using transistors? وزارة التعليم Ministry of Education 102 2024-1446
Which are the two types of gates you can make when you combine logic gates?
What is the function of diodes and what are their two terminals?
What are the advantages of using transistors?
4 What is an integrated circuit (IC)? 5 Open Multisim Live and draw the basic circuit of an OR logic gate. The components that you will need are shown below: 6 A Digital Constant 2-Input OR LED Ground Use Multisim Live to draw the digital circuit that corresponds to the following function. Y = (A + B) · (A · C) وزارة التعليم Ministry of Education 2024-1446 103
What is an integrated circuit (IC)?
Open Multisim Live and draw the basic circuit of an OR logic gate. The components that you will need are shown below:
Use Multisim Live to draw the digital circuit that corresponds to the following function.
7 Create the following digital circuit in Multisim Live: A 0 B 0 C 0 NOT OR OP LED1 XOR PR1 0/1 In which states is the probe (output) (0) Low and in which states is it (1) High? Run the simulation and fill in the table below: وزارة التعليم Ministry of Education 104 2024-1446 Input A 0 Input B 0 Input C Output Y 0 0 0 1 0 1 0 0 1 1 1 0 0 1 0 1 1 1 0 1 1