EE203 Digital Design 1. Digital & Number Systems PDF

Document Details

ProtectiveCouplet7327

Uploaded by ProtectiveCouplet7327

Yale University

2024

AGU

Dr. Abdulkadir Köse

Tags

digital design computer systems number systems digital electronics

Summary

These lecture notes cover digital design concepts, including digital systems, signals, and computer systems. FALL 2024 lectures by Dr. Abdulkadir Köse.

Full Transcript

EE203 Digital Design 1. Digital & Number Systems Instructor: Dr. Abdulkadir Köse FALL 2024 EE203 Digital Design Digital System Takes a set of discrete information inputs and...

EE203 Digital Design 1. Digital & Number Systems Instructor: Dr. Abdulkadir Köse FALL 2024 EE203 Digital Design Digital System Takes a set of discrete information inputs and discrete internal information (system state) and generates a set of discrete information outputs. Discrete Discrete Inputs Information Processing Discrete System Outputs System State EE203 Digital Design The Digital Computer The memory stores programs as well as input, output, and intermediate data. The datapath performs arithmetic and other data-processing operations as specified by the program. The control unit supervises the flow of information between the various units. A datapath, when combined with the control unit, forms a component referred to as a central processing unit, or CPU. EE203 Digital Design Abstraction Layers In Computer Systems Design A fundamental aspect of the computer systems design process is the concept of “layers of abstraction.” Typical Layers of Abstraction in Modern Computer Systems EE203 Digital Design Signal An information variable represented by physical quantity. For digital systems, the variable takes on discrete values. Two level, or binary values are the most prevalent values in digital systems. Binary values are represented abstractly by: digits 0 and 1 words (symbols) False (F) and True (T) words (symbols) Low (L) and High (H) and words On and Off. Binary values are represented by values or ranges of values of physical quantities EE203 Digital Design Chapter 1 5 Analog and Digital Signal Analog system The physical quantities or signals may vary continuously over a specified range. Digital system The physical quantities or signals can assume only discrete values. Greater accuracy X(t) X(t) t t EE203 Digital Design Analog signal Digital signal An Analog System A basic audio public address system EE203 Digital Design A Hybrid Digital and Analog Sytem Basic block diagram of a CD player (one channel) EE203 Digital Design Babbage – First digital computer The concept of a digital computer can be traced back to Charles Babbage. He designed the first automatic mechanical computing engines in the 1830s. He invented computers but failed to build them. The first complete Babbage Engine was completed in London in 2002. The Babbage Engine EE203 Digital Design ENIAC – First first programmable general- purpose electronic digital computer ENIAC (Electronic Numerical Integrator and Computer), c. 1946. EE203 Digital Design Evolution of Electronic Devices EE203 Digital Design MOORE’S LAW EE203 Digital Design Binary Digits Each of the two digits in the binary system, 1 and 0, is called a bit. In digital circuits, two different voltage levels are used to represent the two bits. Generally, 1 is represented by the higher voltage, which we will refer to as a HIGH, and a 0 is represented by the lower voltage level, which we will refer to as a LOW (positive logic). Groups of bits (combinations of 1s and 0s), called codes, are used to represent numbers, letters, symbols, instructions, and anything else required in a given application. EE203 Digital Design Logic Levels The voltages used to represent a 1 and a 0 are called logic levels. The voltage values between VL(max) and VH(min) are unacceptable for proper operation. A voltage in the unacceptable range can appear as either a HIGH or a LOW to a given circuit. For example, the HIGH input values for a certain type of digital circuit technology called CMOS may range from 2 V to 3.3 V and the LOW input values may range from 0 V to 0.8 V. If a voltage of 2.5 V is applied, the circuit will accept it as a HIGH or binary 1. If a voltage of 0.5 V is applied, the circuit will accept it as a LOW or binary 0. EE203 Digital Design Digital Waveforms Digital waveforms consist of voltage levels that are changing back and forth between the HIGH and LOW levels or states. A single positive-going pulse is generated when the voltage (or current) goes from its normally LOW level to its HIGH level and then back to its LOW level. The negative-going pulse is generated when the voltage goes from its normally HIGH level to its LOW level and back to its HIGH level. A digital waveform is made up of a series of pulses. EE203 Digital Design Waveform Characteristics Waveforms in digital systems are composed of series of pulses, sometimes called pulse trains, and can be classified as either periodic or nonperiodic. A periodic pulse waveform is one that repeats itself at a fixed interval, called a period (T). The frequency ( f ) is the rate at which it repeats itself and is measured in hertz (Hz). The relationship between frequency and period is expressed as follows: 𝟏 𝒇= 𝑻 An important characteristic of a periodic digital waveform is its duty cycle, which is the ratio of the pulse width (𝒕𝑾 ) to the period (T); 𝒕𝑾 Duty cycle = 𝟏𝟎𝟎% 𝑻 EE203 Digital Design Exercise A portion of a periodic digital waveform is shown in Figure. The measurements are in milliseconds. Determine the following: (a) period (b) frequency (c) duty cycle EE203 Digital Design Clock In digital systems, all waveforms are synchronized with a basic timing waveform called the clock. The clock is a periodic waveform in which each interval between pulses (the period) equals the time for one bit. In figure below, each change in level of waveform A occurs at the leading edge of the clock waveform. The clock waveform itself does not carry information. EE203 Digital Design Timing Diagrams A timing diagram is a graph of digital waveforms showing the actual time relationship of two or more waveforms and how each waveform changes in relation to the others. EE203 Digital Design Data Transfer Data refers to groups of bits that convey some type of information. Binary data are transferred in two ways: serial and parallel. EE203 Digital Design Exercise a) Determine the total time required to serially transfer the eight bits contained in waveform A, and indicate the sequence of bits. The left-most bit is the first to be transferred. The 1 MHz clock is used as reference. b) What is the total time to transfer the same eight bits in parallel? EE203 Digital Design Number Systems Digital world 011000100100111 00010010010101 01000101001101 2,452,748,179 “Print this slides.” EE203 Digital Design 22 All information in a computer: binary form. →Numbers, letters, controls, images, etc. Decimal numbers 578.23 = 5 102 + 7 101 + 8 100 + 2 10−1 + 3 10−2 Weighted system (base-ten or radix 10) … 105104103102101100.10-110-210-3 … Decimal point or radix point EE203 Digital Design 23 Binary Numbers Only two digits (bits): 0 and 1 Base-two system Least Significant Bit (LSB) Most Significant Bit (MSB) 2N…252423222120.2-12-22-3 …2-M 1 0.5 0.25 0.125 32 2 16 8 4 Binary point EE203 Digital Design 24 Decimal Numbers and Binary Numbers EE203 Digital Design 25 N bits: from zero to 2N-1 E.g., – 8 bits: from 0 to 255 – (00000000)2 = (0)10 – (11111111)2 = (255)10 210 = 1 024 → 1 k (kilo) 220 = 1 048 576 → 1 M (mega) 230 = 1 073 741 824 → 1 G (giga) 240 = 1 099 511 627 776 → 1 T (tera) EE203 Digital Design 26 Binary to Decimal Convert the binary number 1101101 to decimal. (1011101)2 = ? EE203 Digital Design 27 Convert the fractional binary number 0.1011 to decimal. EE203 Digital Design 28 Decimal to Binary (12)10 = (1100)2 (245)10 = ? EE203 Digital Design 29 (0.3125)10 = (.0101)2 Continue to the desired decimal places Or stop when the fractional part is all 0. (0.1875)10 = ? EE203 Digital Design 30 Octal and Hexadecimal Systems Numbers get too long with the binary system. – Difficult to be read and written by human. – For human reading and writing, octal and hexadecimal systems are often used. Three bits → one digit in octal system. Four bits → one digit in hexadecimal system. EE203 Digital Design 31 Conversion Between Binary and Hexadecimal Numbers (10A4)16 000 (1001 1111 0011 1101)2 = ? (B37E)16 = ? EE203 Digital Design 32 Binary Arithmetic Operations EE203 Digital Design 33 Complements of Binary Numbers Needed for negative numbers. 1’s complement: change all 1s to 0s and all 0s to 1s. 2’s complement = (1’s complement) + 1 EE203 Digital Design 34 How to obtain complements? 1’s complement 2’s complement EE203 Digital Design 35 Signed Numbers To represent both positive and negative numbers. Sign bit + magnitude – Left-most bit: sign, 0 for positive and 1 for negative. 2’s complement, 1’s complement, sign-magnitude 2’s complement 8 bit example −24 = 11101000 (24 = 00011000) 1’s complement −24 = 11100111 Sign-magnitude −24 = 10011000 (-36)10 = ? EE203 Digital Design 36 Signed Numbers Range Generally (2’s complement), N-bit signed binary numbers can represent values in the following range: -2N-1 to +2N-1-1 Positive Numbers Negative Numbers 00000000 represents +0 10000000 represents -128 00000001 represents +1 10000001 represents -127 00000010 represents +2 10000010 represents -126 -------- -------- 01111111 represents +127 11111111 represents -1 Binary number length Range that can be represented 4 digits (4 bits) -8 to -1, +0 to +7 8 digits (8 bits) -128 to -1, +0 to 127 16 digits (16 bits) -32,768 to -1, +0 to 32,767 32 digits (32 bits) -21,474,483,648 to -1, +0 to 21,474,483,647 EE203 Digital Design 37 Arithmetic Operations with Signed Numbers Addition Both numbers positive Positive number with magnitude larger than negative number EE203 Digital Design 38 Negative number with magnitude larger than positive number Both numbers negative Summary: just add the two numbers and discard carry. EE203 Digital Design 39 Overflow conditions When two positive or negative numbers with large magnitude are added. Subtraction Take the 2’s complement of the subtrahend and add. Discard any final carry bit. Multiplication Multiple addition. EE203 Digital Design 40 Display in decimal Conversion necessary Computation in binary EE203 Digital Design 41 Binary Coded Decimal (BCD) Expression of each digit in decimal with a binary code. For example, 35 → 0011 0101 98 →1001 1000 170 → 0001 0111 0000 2469 → 0010 0100 0110 1001 Invalid codes: 1010, 1011, 1100, 1101, 1110, and 1111 Provide excellent interface. E.g. keypads and digital readouts. EE203 Digital Design 42 Gray Code Unweighted and non-arithmetic. Only a single bit change from one code word to the next in sequence. EE203 Digital Design 43 Binary to Gray Code Conversion MSB of gray code is equal to MSB of binary code. Other gray code bits obtained by XORing binary bits at each index with the previous index. EE203 Digital Design 44 Gray to Binary Code Conversion The MSB of the binary code is always same with the MSB of the gray code. Other binary code bits are determined by checking the gray code bit at that index. If the gray code bit is 0, copy the previous binary bit; otherwise, copy the inverted previous binary bit. EE203 Digital Design 45 Gray Code Application Example ― Shaft Position Encoder If there is a slight misalignment,… EE203 Digital Design 46 Gray Code Application Example ― Shaft Position Encoder Even if there is a slight misalignment,… EE203 Digital Design 47 Alphanumeric Codes Computers should handle, – Numbers: 0 to 9 – Letters: Roman alphabets, lowercase and uppercase – Special characters: ! @ # $ % ^ & * … ASCII codes – American Standard Code for Information Interchange – Standard binary code – Seven bits → 128 characters – Control characters: routing data and arranging printed text – Extended ASCII: additional 8-bit for foreign alphabetic letters, Greek letters, mathematical symbols, etc. Unicode (ASCII is for English.) – Industry standard for common representation of symbols and ideographs for the most of the world’s languages. EE203 Digital Design 48 ASCII Code EE203 Digital Design 49 Error in Communication Error 0101 0111 Error 01010 01110 Parity bit Even no. 1s Odd no. 1s → There is an error. EE203 Digital Design 50 Parity Bit Bit error detection Attached to a group of bits to make the total number of 1s in a group always even or odd. – Even parity: more common. Either at the beginning or at the end of the word. Can detect a single bit (or odd numbers of) error. Cannot detect even numbers of error. EE203 Digital Design 51

Use Quizgecko on...
Browser
Browser