Special:
|
[DAT] (requires LDraw-compatible viewer)
|
Subject:
|
Re: BCD
|
Newsgroups:
|
lugnet.robotics.handyboard
|
Date:
|
Wed, 2 Apr 1997 20:19:55 GMT
|
Original-From:
|
Rajesh Gottlieb <rajeshg@ccwf=spamless=.cc.utexas.edu>
|
Viewed:
|
2428 times
|
| |
 | |
> Does anyone know the details of how a BCD number is stored?
> I'm unsure as to what a "half-carry" is in HC11 CCR.
> It would be great if someone can provide a little example. :)
As far as BSD goes; every decimal digit is represented by four binary
digits:
decimal BCD
0 0000
1 0001
2 0010
3 0011
4 0100
5 0101
6 0110
7 0111
8 1000
9 1001
so that a number like 3725 would be represented by
0011 0111 0010 0101
I've never heard the term "half-carry" before, but it might be related to
the fact that you can't add two BCD's as if they were ordinary binary
numbers. For example if you were to perform to operation 3725 + 6 you
would get
0011 0111 0010 0101
+ 0000 0000 0000 0110
_____________________
0011 0111 0011 0001
Hope this helps
Rajesh
|
|
Message has 1 Reply:  | | Re: BCD
|
| Yeah, it helps alot. Thanks. I guess the half-cary is for adding to the next significant 4 bit word. And the current word, including overflow, is then subtracted by ten (1010), if the half-carry is flaged, to yield the proper BCD word. Is this what (...) (28 years ago, 3-Apr-97, to lugnet.robotics.handyboard)
|
Message is in Reply To:
 | | BCD
|
| Does anyone know the details of how a BCD number is stored? I'm unsure as to what a "half-carry" is in HC11 CCR. It would be great if someone can provide a little example. :) ---...--- ericson mar Master of Engineering Candidate Project: Mobile (...) (28 years ago, 2-Apr-97, to lugnet.robotics.handyboard)
|
6 Messages in This Thread:       
     
- Entire Thread on One Page:
- Nested:
All | Brief | Compact | Dots
Linear:
All | Brief | Compact
This Message and its Replies on One Page:
- Nested:
All | Brief | Compact | Dots
Linear:
All | Brief | Compact
|
|
|
|