Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
10/19/03 23:29
Read: times


 
#56906 - RE: not clear
Responding to: ???'s previous message
"Each digit is 5 bits long, comprising a 4 bit bcd digit and a parity bit.i need to store this 5 bits into ram. How to transform this 5 bit long digit into hex value"

Ditch the parity bit after you have optionally used it for its checking purpose. If the parity bit is in bit 4 and the BCD is in bits 3-0, clear bit 4 and you're done! A single BCD digit needs no further conversion. On the other hand, if the parity bit is in bit 0 and the BCD is in bits 4-1, shift the right one bit; shifting a zero into bit 7 and shifting the parity bit out altogether. Then the BCD is in bit 3-0 and needs no further conversion.


List of 14 messages in thread
TopicAuthorDate
converting 5 bit bdc to hex            01/01/70 00:00      
   RE: converting 5 bit bdc to hex            01/01/70 00:00      
      RE: converting 5 bit bdc to hex            01/01/70 00:00      
   RE: converting 5 bit bdc to hex            01/01/70 00:00      
      RE: converting 5 bit bdc to hex            01/01/70 00:00      
         RE: converting 5 bit bdc to hex            01/01/70 00:00      
         No such thing as 5-bit BCD!            01/01/70 00:00      
   RE: not clear            01/01/70 00:00      
      RE: not clear            01/01/70 00:00      
         RE: not clear            01/01/70 00:00      
         RE: not clear - a valuable lesson            01/01/70 00:00      
         RE: not clear            01/01/70 00:00      
   RE: converting 5 bit bdc to hex            01/01/70 00:00      
      RE: converting 5 bit bdc to hex            01/01/70 00:00      

Back to Subject List