01 Number Systems - EE2000 Logic Circuit Design Number...

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

View Full Document Right Arrow Icon
1 EE2000 Logic Circuit Design Number Systems & Arithmetic
Background image of page 1

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

View Full DocumentRight Arrow Icon
2 Outline ± Number systems ± Conversion between different radix systems ± Binary arithmetic ± Complement of binary numbers ± Signed number representations ± Codes in Digital World ± BCD ± ASCII ± Gray codes ± Parity and error correction
Background image of page 2
3 Number Systems ± Decimal number system employed in everyday arithmetic ± Represent numbers by strings of digits called positional notation ± Digits – the Latin word for fingers ± a n -1 a n -2 a 2 a 1 a 0 (0 a i < 10) ± Each digit is associated to a value depends on its position in the string
Background image of page 3

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

View Full DocumentRight Arrow Icon
4 Polynomial Form of Integer ± The no. can be expressed in power series ± N = a n -1 r n -1 + a n -2 r n -2 + … + a 2 r 2 + a 1 r + a 0 ± N : the decimal value of the integer ± n : number of digits ± r : radix (base) ± a i : coefficients (digit), 0 a i < r ± e.g. (7672) 10 ± 4 digits, so n = 4 ± decimal number, i.e. r = 10 ± a i : 0 a i < 10, i.e. one of the ten digits (0, 1, 2, …, 9) ± N = 7 x 10 3 + 6 x 10 2 + 7 x 10 + 2 These two 7 symbols have different meaning
Background image of page 4
5 Floating Point Number ± a n -1 a n -2 a 2 a 1 a 0 . a -1 a -2 a -( m -1) a - m (0 a i < 10) ± . ” is the radix point ± The left most digit a n -1 is the most significant digit (MSD) ± The right most digit a - m is the least significant digit (LSD) ± General polynomial form ± N = a n -1 r n -1 + … + a 1 r 1 + a 0 r 0 + a -1 r -1 + … + a - m r - m ± Number of digits = n + m ± e.g. (767.2) 10 ± n = 3, m = 1 ± N = 7 x 10 2 + 6 x 10 1 + 7 + 2 x 10 -1
Background image of page 5

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

View Full DocumentRight Arrow Icon
6 Alternative Conversion Method ± (…(( a n -1 r + a n -2 ) r + a n -3 ) r + … + a 1 ) r + a 0 ± + ± ( a -1 + ( a -2 + (… + ( a - m +1 + a - m r -1 ) r -1 )… r -1 ) r -1 ± e.g. (767.295) 10 ± = (( 7 x 10 + 6 ) 10 + 7 ) ± + ( 2 + ( 9 + 5 x 10 -1 ) 10 -1 ) 10 -1
Background image of page 6
7 Other Number Systems ± Decimal (base 10) are for human ± Three number systems are commonly used in computer work ± Binary (base 2) ± Octal (base 8) ± Hexadecimal (base 16)
Background image of page 7

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

View Full DocumentRight Arrow Icon
8 Binary Number System ± A base 2 system with two digits: 0 and 1 ± Expressed with a string of 1s and 0s ± The digits are called bits (b inary digits ). ± The left most bit called most significant bit (MSB) ± The right most bit called least significant bit (LSB) 7 6 5 4 3 2 1 0 Decimal 111 110 101 100 11 10 1 0 Binary
Background image of page 8
9 Radix Conversion ± Convert from binary to decimal ± e.g. convert (1011.11) 2 to decimal ± = 1 x 2 3 + 0 x 2 2 + 1 x 2 + 1 + 1 x 2 -1 + 1 x 2 -2 ± = 8 + 0 + 2 + 1 + 0.5 + 0.25 ± = (11.75) 10 ± i.e. the summation of the power series only Powers of 2 1 0 2 1 4 2 8 3 16 4 1,048,576 2 n 20 n
Background image of page 9

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

View Full DocumentRight Arrow Icon
10 From Decimal to Binary ± Convert from decimal to binary ± e.g. convert (746) 10 to binary ± = 7 x 10 2 + 4 x 10 1 + 6 x 10 0 ± = 111 x 1010 10 + 100 x 1010 1 + 110 x 1010 0 ± Involve binary multiplication! ± Time consuming and not easy to compute
Background image of page 10
11 Two Methods ± Method 1: Subtraction ± Subtract from the largest power of 2 that less than or equal to that number ± Put a 1 in the corresponding position of the binary equivalent ± Repeat the subtract procedure with the remainder until the reminder becomes 0 ± Method 2: Division ± Divide the number by 2 ± The remainder (either 0 or 1) gives the least significant bit ± Divide the quotient by 2 repeatedly until the quotient becomes 0
Background image of page 11

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

View Full DocumentRight Arrow Icon
12 Method 1: Subtraction ± N = 746 ±
Background image of page 12
Image of page 13
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 01/11/2011 for the course EE 2000 taught by Professor Vancwting during the Fall '07 term at City University of Hong Kong.

Page1 / 81

01 Number Systems - EE2000 Logic Circuit Design Number...

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

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