Lecture07 - Announcements ECE 2300 Introduction to Digital...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
Lecture 7: Spring 2010 1 ECE 2300 Introduction to Digital Logic Design Binary Arithmetic Addition Subtraction Multiplication Lecture 7: 2 Announcements Lab 3 is on Blackboard No class Feb 22 Make up class is Feb 26 at the usual time, room TBD Prelim 1 Tuesday, March 2, 7:30-10pm, PH 101 Closed book and notes Covers all lectures through Feb 24 (not Feb 26) Lecture 7: 3 Positional Number Representation What does 1432.67 mean? 1432.67 = 1*10 3 + 4*10 2 + 3*10 1 + 2*10 0 + 6*10 -1 + 7*10 -2 Base 10 positional representation Uses digits 0,1,2,…,9 General base B positional representation a n a n-1 …a 2 a 1 a 0 B = a n *B n +a n-1 B n-1 +…+a 2 B 2 +a 1 B 1 +a 0 B 0 Uses digits 0,1,2,…,B-1 Common bases of interest Base 2, i.e., Binary ( digits 0,1 ) Base 8, i.e., Octal ( digits 0,1,…,7 ) Lecture 7: 4 For the binary number b p -1 b p -2 …b 1 b 0 .b -1 b -2 …b - n the decimal number is Examples 10011 2 =1*2 4 +0*2 3 +0*2 2 +1*2 1 +1*2 0 = 16 + 0 + 0 +2 + 1 = 19 10 101.001 2 = 1*2 2 + 1*2 0 + 1*2 -3 = 5.125 10 ! p -1 i=- n D = b i 2 i Binary Numbers Lecture 7: 5 Decimal-to-Binary Conversion Successively divide by 2 Binary digits are remainders of each division LSB is first digit obtained X = 23 (base 10) = 23/2 = 11 remainder 1 = 11/2 = 5 remainder 1 = 5/2 = 2 remainder 1 = 2/2 = 1 remainder 0 = 1/2 = 0 remainder 1 = 10111 (base 2) Lecture 7: 6 The Octal Number Code Octal to decimal conversion Examples 1427 8 =1*8 3 +4*8 2 +2*8 1 +7*8 0 = 512 + 256 + 16 + 7 = 791 10 304.03 8 = 3*8 2 + 0*8 1 + 4*8 0 + 3*8 -2 = 196.046875 10 ! p -1 i=- n B = b i 8 i where an octal number is b p -1 b p -2 …b 1 b 0 .b -1 b -2 …b - n Octal Arithmetic Lecture 7: 7 Decimal-to-Octal Conversion Successively divide by 8 Octal digits are remainders of each division LSB is first digit obtained X = 123 (base 10) = 123/8 = 15 remainder 3 = 15/8 = 1 remainder 7 = 1/8 = 0 remainder 1 = 173 (base 8) Lecture 7: 8 The Hexadecimal Number Code Hex to decimal conversion Examples 4A1 16 =4*16 2 +A*16 1 +1*16 0 = 1024 + 160 + 1 = 1185 10 3F4.3 16 = 3*16 2 + F*16 1 + 4*16 0 + 3*16 -1 = 768 + 240 + 4 + .1875 = 1012.1875 ! p -1 i=- n B = b i 16 i where a hex number is b p -1 b p -2 …b 1 b 0 .b -1 b -2 …b - n Hexadecimal Arithmetic Lecture 7: 9 Decimal-to-Hexadecimal Conversion Successively divide by 16 Octal digits are remainders of each division LSB is first digit obtained X = 1185 (base 10) = 1185 /16 = 74 remainder 1 = 74 /16 = 4 remainder A = 4/16 = 0 remainder 4 = 4A1 (base 16)
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 04/10/2010 for the course ECE 2300 taught by Professor Long during the Spring '08 term at Cornell University (Engineering School).

Page1 / 5

Lecture07 - Announcements ECE 2300 Introduction to Digital...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online