Circuits, Computer Architecture, and Analog vs. Digital Systems PDF
Document Details
Uploaded by StylizedChrysoberyl2113
Mark Polak
Tags
Summary
These slides provide an overview of digital circuits, computer architecture, and the difference between analog and digital systems. The presentation covers topics like binary addition, logic gates, the von Neumann architecture, and digital-to-analog converters.
Full Transcript
Circuits, Computer Architecture, and Analog vs. Digital Systems Mark Polak Circuit for Addition Addition with Logic Gates Binary addition involves adding two binary numbers digit by digit, considering carry-over bits. Each digit can have two possible values: 0 or 1. The sum...
Circuits, Computer Architecture, and Analog vs. Digital Systems Mark Polak Circuit for Addition Addition with Logic Gates Binary addition involves adding two binary numbers digit by digit, considering carry-over bits. Each digit can have two possible values: 0 or 1. The sum of two bits can be 0, 1, or 10 (in the case of a carry). A Sum Half Outputs Inputs Adder Carry B Implementing Binary Addition with XOR XOR (Exclusive OR) gate performs bit-wise addition without considering carry. When XORing two bits, the output is 1 if the inputs are different and 0 if they are the same. By connecting the bits of the two numbers to XOR gates, we can obtain the sum of corresponding bits. A B Sum 0 0 0 0 1 1 1 0 1 1 1 0 Handling Carry with AND To handle the carry-over bit, we use the AND gate. The AND gate outputs 1 only when both inputs are 1; otherwise, it outputs 0. By connecting the bits of the two numbers to an AND gate, we can obtain the carry-out bit. A B Sum 0 0 0 0 1 0 1 0 0 1 1 1 Half Adder Truth Table with Carry-Out Image Source: https://www.electronics-tutorials.ws/combination/comb_7.html How to Create a Full Adder? For your information only (not necessary to memorize). The OR gate combines the sum and carry bits to produce the final result. By connecting the sum and carry bits to an OR gate, we obtain the final sum of the binary addition. Full Adder Truth Table with Carry Image Source: https://www.electronics-tutorials.ws/combination/comb_7.html Cascading Adders for Multi-Bit Addition For multi-bit addition, we can cascade multiple 1-bit adders. The carry-out bit from each stage is connected to the carry-in bit of the next stage. This allows for the addition of numbers with multiple bits. Computer Architecture Von Neumann Computer Architecture The Von Neumann architecture is a fundamental design concept for computers. Named after mathematician and computer scientist John von Neumann. Image Source: https://en.wikipedia.org/wiki/Von_Neumann_architecture#/media/File:Von_Neumann_Architecture.svg Key Components Central Processing Unit (CPU): Executes instructions and performs calculations. Contains: A control unit that includes an instruction register and a program counter. Arithmetic logic unit that performs arithmetic and bitwise operations on integer binary numbers. Memory Unit: Stores both data and instructions. Input/Output (I/O) Devices: Facilitate communication between the computer and external devices. Main Characteristics Stored-Program Concept: Instructions are stored in memory along with data. Instructions can be fetched, decoded, and executed sequentially. Sequential Execution: Instructions are executed one after another in a specific order. Single Bus (communication pathway) Architecture: Data and instructions share a common bus for communication. How a Computer Program Runs Fetch-Decode-Execute Cycle: Fetch: The CPU retrieves the next instruction from memory. Decode: The CPU interprets the instruction and determines the operation to be performed. Execute: The CPU performs the operation indicated by the instruction. Repeat: The cycle continues until the program execution is complete. Von Neumann Architecture Today The Von Neumann architecture forms the basis of modern computing systems. Some modern improvements to the basic architecture: Parallel Processing: Multiple processor cores or execution units work simultaneously to execute instructions and perform computations. Caching and Memory Hierarchy: Multiple levels of memory with varying speeds and capacities. Pipelining: Breaks down the execution of instructions into multiple stages, allowing simultaneous processing of different stages simultaneously. Analog and Digital Systems Analog World and Digital Computers In the world of signals and systems, there are two fundamental types: digital and analog. The real world is inherently analog, with physical phenomena represented by continuous signals (e.g., sound, temperature, light). Computers, on the other hand, operate using digital signals and can only process discrete values. To bridge the gap between the analog world and digital computers, Digital-to-Analog (D/A) and Analog-to-Digital (A/D) converters are used. Analog-to-Digital-to-Analog Image Source: https://www.allaboutcircuits.com/technical-articles/an-introduction-to-digital-signal-processing/ A/D Converters A/D converters transform analog signals into digital signals. They sample and measure the continuous analog signal at regular intervals, converting it into a discrete digital representation. A/D converters are found in various applications, such as digital audio recording, temperature sensing, and data acquisition systems. Examples: Audio Recording Data Acquisition and Instrumentation: Enable precise measurements such as temperature monitoring, pressure sensing, voltage measurement, environmental monitoring… D/A Converters D/A converters transform digital signals into analog signals. They convert binary digital data into continuous voltage levels or current signals. D/A converters are commonly used in audio devices to convert digital audio data into analog signals that can be amplified and played through speakers. Examples: Audio Playback and Amplification Control Systems and Actuators: Enable precise control of motors, valves, and other mechanical or electrical components by converting digital commands into analog signals. Quantization and Sampling Rate in Analog Signal Digitization When digitizing analog signals, two important concepts come into play: quantization and sampling rate. Understanding these concepts is essential to ensure accurate and realistic representation of analog signals in the digital domain. Quantization Quantization is the process of converting continuous analog signals into discrete digital values. It involves dividing the range of possible analog signal amplitudes into a finite number of discrete levels. Each level is assigned a digital code or value, representing a sample of the original analog signal. Quantization Levels and Resolution The number of discrete levels used in quantization determines the resolution or precision of the digitized signal. A higher number of levels (greater resolution) allows for more accurate representation of the original analog signal. The resolution is typically expressed in bits, such as 8-bit, 16-bit, or 24-bit, indicating the number of possible digital values. Quantization introduces a small error known as quantization error or quantization noise. This error occurs because the analog signal's continuous amplitude is approximated by discrete levels during quantization. For example, sampling a signal such as sounds at 8-bit resolution will give only 256 discrete levels to encode the full analog range. Example: 3-bit Encoding = 8 Quantization Levels Sampling Rate Sampling rate (or sampling frequency) refers to the number of samples taken per second from an analog signal during digitization. It is the time domain resolution. It determines the frequency at which the analog signal is measured and converted into digital samples. Sampling rate is typically expressed in Hertz (Hz) and is commonly referred to as samples per second or samples/sec. The Nyquist-Shannon sampling theorem states that to accurately reconstruct an analog signal from its samples, the sampling rate must be at least twice the highest frequency component in the signal. This ensures that no information is lost during the sampling process and allows for accurate signal reconstruction. Sampling Rate Note: Sampling Interval Ts is the inverse of the sampling rate. Image Source: https://www.open.edu/openlearn/science-maths-technology/exploring-communications-technology/content-section-3.2 Examples How many discrete levels can be encoded with 16 bits? 2 to the power of 16 = 65536 quantization levels. We want to sample an analog signal (pressure sensor) every 0.2 seconds. What would the sampling frequency be? 1 sample every 0.2 seconds is 1/0.2 or 5 Hz. If we want to record sound at 48 kHz with 16-bit resolution for one hour, how much data would we need to store? 48,000 samples/second * 2 bytes/sample * (60*60) seconds = 345,600,000 bytes (around 330 MB)