EE101Lecture14

# EE101Lecture14 - Introduction to Digital Logic Lecture 14...

This preview shows pages 1–9. Sign up to view the full content.

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

View Full Document
© Mark Redekopp, All rights reserved Radix Complement If we need to subtract 2 hours on a clock there are 2 ways to do it. Subtract 2 or add 10 12 1 2 3 4 5 6 11 10 9 8 7 12 1 2 3 4 5 6 11 10 9 8 7
© Mark Redekopp, All rights reserved Radix Complement The same technique can be done if we limit ourselves to a fixed amount of digits Using 2 digits, to perform 4 2 we can subtract 2 or add 98 00 01 02 03 04 . . 99 98 . . . 00 01 02 03 04 . . 99 98 . . . -2 +98

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

View Full Document
© Mark Redekopp, All rights reserved Radix Complement 12 1 2 3 9 10 11 4 8 7 5 6 12 1 2 3 9 10 11 4 8 7 5 6 00 01 02 03 98 99 04 . . . . 00 01 02 03 98 99 04 . . . . 0000 0001 0010 0011 1110 1111 0100 . . . . 0000 0001 0010 0011 1110 1111 0100 . . . . 10’s complement 2’s complement Clock Analogy Subtract 2 Add 10 Subtract 2 Add 98 Subtract 2 Add 14
© Mark Redekopp, All rights reserved Radix Complement The radix complement of a number, ( X) r , with n digits can be found using the following formula r’s complement of X r = r n - X or (r n -1) X + 1 This is the r- 1’s complement base r

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

View Full Document
© Mark Redekopp, All rights reserved Radix Complement r’s complement of X r = r n - X or (r n -1) X + 1 10’s comp. of 3841 10 7’s comp. of 2350 7 16’s comp. of EC47 16 3841 10 9999 10 (r n -1) - X 6158 10 + 1 10 + 1 10 6159 10 9’s comp 10’s comp 2350 7 6666 7 (r n -1) - X 4316 7 + 1 7 + 1 7 4320 7 6’s comp 7’s comp EC47 16 FFFF 16 (r n -1) - X 13B8 16 + 1 16 + 1 16 13B9 16 15’s comp 16’s comp Important: (r n -1) is always the largest number possible for n-digits of base r and is thus n copies of the digit (r-1)
© Mark Redekopp, All rights reserved Hex Values • Any string of 1’s and 0’s can be converted to hex To understand the meaning of a hex number we must know the underlying binary system A 3 1010 0011 +163 (Unsigned) -93 (2’s comp.) When you see hex, you must know what binary system the underlying 1’s and 0’s are using hex bin

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

View Full Document
© Mark Redekopp, All rights reserved Hex Values Unsigned • Signed (2’s comp.) A 3 16 16 0 16 1 = 10*16 + 3 = 163 A 3 16 FF - A3 5C + 1 5D 1 010 MSB = 1
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

### Page1 / 27

EE101Lecture14 - Introduction to Digital Logic Lecture 14...

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

View Full Document
Ask a homework question - tutors are online