218L3F08a - ESE218 Lecture 3 Decimal codes. Gray code....

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

View Full Document Right Arrow Icon
9/9/08 ESE218 Fall 2008 Lecture 3 1 Outline ± Decimal codes ² Binary-coded decimals (BCD) ² BCD addition ² Representation of negative numbers ² 10’s complements ² 9’s complements ² Self-complementing codes ² Excess-3 ² 2421 ± Reflected Gray code ± Angular position encoder ± Summary ESE218 Lecture 3 Decimal codes. Gray code. Error detection
Background image of page 1

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

View Full DocumentRight Arrow Icon
9/9/08 ESE218 Fall 2008 Lecture 3 2 Binary coded decimals 0101 5 0100 4 0011 3 1000 8 0111 7 0110 6 0000 0 BCD Digits 0010 2 - 9 1 6 unused codes 1001 0001 17 10 = 0001 0111 BCD 25 10 = 0010 0101 BCD + 0011 1100 11 carry Result of a bit-by-bit addition is not a BCD number 0110 = +6 if sum > 9 + 0011 0010 1 1 carry 42 10 = 0100 0010 BCD Weighted code
Background image of page 2
9/9/08 ESE218 Fall 2008 Lecture 3 3 Negative BCD numbers 0101 5 0100 4 0011 3 1000 8 0111 7 0110 6 0000 0 BCD Digits 0010 2 - 9 1 6 unused codes 1001 0001 00 = 0 0000 0000 01 = +1 0000 0001 02 = +2 0000 0010 .. 97 = -3 1001 0111 98 = -2 1001 1000 99 = -1 1001 1001 +2 0000 0010 -1 1001 1001 1011 1 0110 0110 <- add 6 +1 1 0000 0001 carry discarded + + Presented as 10’s complements <- not a BCD <- add 6
Background image of page 3

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

View Full DocumentRight Arrow Icon
9/9/08 ESE218 Fall 2008 Lecture 3 4 9’s and 10’s complements 9’s complement + 1 = 10’s complement 3-digit decimal numbers with sign: -100…+ 99 +3 001 002 003 999 998 997 996 900 099 000
Background image of page 4
Image of page 5
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 03/21/2010 for the course ESE 218 taught by Professor Donetsky during the Fall '08 term at SUNY Stony Brook.

Page1 / 13

218L3F08a - ESE218 Lecture 3 Decimal codes. Gray code....

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

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