68000 Binary Coded Decimal (BCD) Arithmetic
68000 Binary Coded Decimal (BCD) Arithmetic
? Binary Coded Decimal (BCD) is a way to store decimal numbers in binary. This number representation uses 4 bits to store each digit from 0 to 9. For example:
199910 = 0001 1001 1001 1001 in BCD
? BCD wastes storage space since 4 bits are used to store 10 combinations rather than the maximum possible 16.
? BCD is often used in business applications and calculators.
? The 68000 instruction set includes three instructions that offer some support for BCD arithmetic:
? ABCD ? SBCD ? NBCD
Add BCD with extend Subtract BCD with extend Negate BCD
? BCD instructions use and affect the X-bit because they are intended to be used in chained calculations where arithmetic is done on strings of BCD digits.
? For addition: the X-bit records the carry
? For subtraction: the X-bit records the borrow
EECC250 - Shaaban
#1 lec #14 Winter99 1-20-2000
EECC250 - Shaaban
#2 lec #14 Winter99 1-20-2000
EECC250 - Shaaban
#3 lec #14 Winter99 1-20-2000
Effect of ABCD
ABCD D0,D1
When X = 0 initially Add D0 to D1 with the X-bit
Before
7 4
2
4 3
0
6
D0
8
D1
0 X-bit
After
7
4
D1
X NZ VC 0 00
EECC250 - Shaaban
#4 lec #14 Winter99 1-20-2000
Effect of ABCD
ABCD D0,D1
When X = 1 initially Add D0 to D1 with the X-bit
7
4 3
0
4
Before
2
6
D0
8
D1
1 X-bit
After
7
5
D1
X NZ VC 0 00
EECC250 - Shaaban
#5 lec #14 Winter99 1-20-2000
................
................
In order to avoid copyright disputes, this page is only a partial summary.
To fulfill the demand for quickly locating and searching documents.
It is intelligent file search solution for home and business.
Related download
- binary codes binary coded decimal bcd
- binary and 8421 codes alyve
- bcd code or 8421 code university of babylon
- digital logic and binary binary numbers binary coded
- binary codes tutorialspoint
- laboratory exercise 2 oakland university
- binary coded decimal bcd
- 68000 binary coded decimal bcd arithmetic
- state machine logic in binary coded decimal bcd
- binary coded decimal b c d dublin city university
Related searches
- binary to decimal decoder
- binary to decimal converter
- signed binary to decimal converter
- binary to decimal signed converter
- binary coded decimal to decimal converter
- binary to binary coded decimal
- natural binary coded decimal
- binary coded decimal addition calculator
- binary coded decimal calculator
- binary coded decimal bcd
- binary coded decimal example
- binary coded decimal to decimal