Unformatted text preview:

ECE 233 Intro to Digital Systems Topics Number Systems Converting Between Them ECE 233 Intro to Digital Systems 1 Administrative Find a lab partner Sign Student Responsibility Form Pick up the FPGA board ECE Parts Room C 114 No lab on Wednesday 11 29 23 Will have a normal lecture and lab demonstration Install Quartus software Bring FPGA board Lab 1 Checkpoint 1 due Wednesday 11 29 23 Homework 1 due Monday 12 04 23 ECE 233 Intro to Digital Systems 2 Number Systems All numbers are represented using bases Bases OR radix r is the number of unique digits in the system Each digit D is restricted to 0 D r DN 1 D1D0 DN 1 rN 1 D1 r1 D0 r0 N number of integers or digits Decimal is Base 10 D2D1D0 D2 102 D1 101 D0 100 0 Di 9 Unique digits 0 9 Example 13710 1 102 3 101 7 100 ECE 233 Intro to Digital Systems 3 The Binary Number System What is binary Electrical signals can be represented as a 0 or a 1 o Any voltage within one range represents a 1 o Any voltage within another range represents a 0 Why is binary important Computers use binary numbers not decimal o Why not use decimal o Harder to easily and quickly tell the difference between ten or more levels o Each individual binary digit is called a bit so 110 is made up of three bits Binary representation is Base 2 radix 2 where the only two digits are 1 and 0 B2B1B0 B2 22 B1 21 B0 20 0 Bi 1 Example 510 in binary is 1012 1 22 0 21 1 20 ECE 233 Intro to Digital Systems 4 Unsigned Binary Examples Examples What is decimal 14 in binary 1410 11102 1 23 1 22 1 21 0 20 1 8 1 4 1 2 0 1 8 4 2 0 14 What is binary 1011 in decimal 10112 1110 1 23 0 22 1 21 1 20 1 8 0 4 1 2 1 1 8 0 2 1 11 ECE 233 Intro to Digital Systems 5 In class Activity Unsigned Binary What is decimal 29 in binary 2910 111012 1 24 1 23 1 22 0 21 1 20 1 16 1 8 1 4 0 2 1 1 16 8 4 0 1 2910 111012 What is decimal 57 in binary 5710 1110012 1 25 1 24 1 23 0 22 0 21 1 20 1 32 1 16 1 8 0 4 0 2 1 1 32 16 8 0 0 1 5710 1110012 What is decimal 75 in binary 7510 10010112 1x26 0 25 0 24 1 23 0 22 1 21 1 20 1 64 0 32 0 16 1 8 0 4 1 2 1x1 64 0 0 8 0 2 1 7510 10010112 ECE 233 Intro to Digital Systems 6 In class Activity Unsigned Binary What is binary 10101 in decimal 101012 2110 1 24 0 23 1 22 0 21 1 20 1 16 0 8 1 4 0 2 1 1 2110 What is binary 01001101 in decimal 010011012 7710 0 27 1 26 0 25 0 24 1 23 1 22 0 21 1 20 0 128 1 64 0 32 0 16 1 8 1 4 0 2 1 1 7710 What is binary 101110 in decimal 1011102 4610 1x25 0 24 1 23 1 22 1 21 0 20 1 32 0 16 1 8 1 4 1 2 0x1 4610 ECE 233 Intro to Digital Systems 7 Two Other Number Systems Other common bases you will see in this class 1 Octal Base 8 Radix 8 digits 0 7 o Oct2Oct1Oct0 Oct2 82 Oct1 81 Oct0 80 0 Octi 7 o Example 83 in Octal is 1238 83 1 82 2 81 3 80 2 Hexadecimal Base 16 Radix 16 digits 0 9 A F o H2H1H0 H2 162 H1 161 H0 160 0 Hi 15 o Note that A 10 B 11 C 12 D 13 E 14 and F 15 o Example 92 in Hexadecimal is 5C16 92 0 162 5 161 C 160 o You may also see it written as 0x5C It is usually easier to convert a number to binary and then use these two tricks 1 Octal Starting from the far right look at every three bits and convert that binary value into a decimal equivalent to Octal 2 Hexadecimal Starting from the far right look at every four bits and convert that binary value into a decimal equivalent to Hexadecimal ECE 233 Intro to Digital Systems 8 Octal and Hexadecimal Examples What is decimal 57 in octal 5710 718 7 81 1 80 7 8 1 1 56 1 57 Alternatively 5710 is 1110012 111 0012 111 7 and 001 1 so 718 What is decimal 77 in hexadecimal 7710 4D16 or 0x4D 4 161 13 160 4 16 13 1 64 13 77 Alternatively 7710 is 010011012 0100 11012 0100 4 and 1101 13 or D so 4D16 Can use the same conversion trick to go back to binary i e convert 4 to binary convert D to binary ECE 233 Intro to Digital Systems 9 Handling Fractions Binary Octal and Hexadecimal can also represent fractions For example 110 1102 is 6 7510 1 22 1 21 0 20 1 2 1 1 2 2 0 2 3 1 4 1 2 0 1 1 1 0 4 2 0 0 5 0 25 0 6 75 Same goes for Octal and Hexadecimal i e 8 1 16 1 etc ECE 233 Intro to Digital Systems 10 Handling Fractions In Class Activity What is decimal 29 25 in binary 29 2510 11101 012 1 24 1 23 1 22 0 21 1 20 0x2 1 1x2 2 16 8 4 0 1 0 00 0 25 29 25 What is decimal 57 125 in binary 57 12510 111001 0012 1 25 1 24 1 23 0 22 0 21 1 20 0x2 1 0x2 2 1x2 3 1 32 1 16 1 8 0 4 0 2 1 1 0x0 5 0x0 25 1x0 125 32 16 8 0 0 1 0 0 0 125 57 125 ECE 233 Intro to Digital Systems 11 Handling Fractions In Class Activity What is binary 10101 1 in decimal 10101 12 21 510 1 24 0 23 1 22 0 21 1 20 1x2 1 1 16 0 8 1 4 0 2 1 1 1x0 5 21 510 What is binary 01001101 0001 in decimal 01001101 00012 77 062510 0 27 1 26 0 25 0 24 1 23 1 22 0 21 1 20 0x2 1 0x2 2 0x2 3 1x2 4 0 128 1 64 0 32 0 16 1 8 1 4 0 2 1 1 0x0 5 0x0 25 0x0 125 1x0 0625 77 0625 ECE 233 Intro to Digital Systems 12 Data Sizes in the Digital World A 1 byte is 8 bits ex 01111010 Kilobyte is 1 024 bytes not 1 000 bytes K 210 bytes M 220 G 230 T 240 P 250 …


View Full Document

Rose-Hulman ECE 205 - Lecture 02 - Number Systems and Conversions

Download Lecture 02 - Number Systems and Conversions
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view Lecture 02 - Number Systems and Conversions and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Lecture 02 - Number Systems and Conversions and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?