please dont rip this site

SX Microcontroller Radix Math Method

ASCII Hex to Binary

by Nikolai Golovchenko

; Input  - ASCII number in x
; Output - binary in x

	mov	W, #-'A'+10
	sb	x.6
	mov	W, #-'0'
	add	x, W
	

ASCII numbers '0'-'9' have codes 48-57, and 'A'-'F' have codes 65-70. The second group differs from the first one by a value of bit 6. To map '0'-'9' to 0-9 we need to substract '0' (if bit 6 is clear), and to map 'A'-'F' to 10-15 we substract 'A' and add 10 (if bit 6 is set).

Comments:


file: /Techref/scenix/lib/math/radix/ah2b-1d4b_sx.htm, 0KB, , updated: 2004/6/10 13:40, local time: 2024/11/30 13:09,
TOP NEW HELP FIND: 
18.220.200.197:LOG IN

 ©2024 These pages are served without commercial sponsorship. (No popup ads, etc...).Bandwidth abuse increases hosting cost forcing sponsorship or shutdown. This server aggressively defends against automated copying for any reason including offline viewing, duplication, etc... Please respect this requirement and DO NOT RIP THIS SITE. Questions?
Please DO link to this page! Digg it! / MAKE!

<A HREF="http://techref.massmind.org/Techref/scenix/lib/math/radix/ah2b-1d4b_sx.htm"> PIC Microcontroller Radix Math Methods ASCII Hex to Binary</A>

After you find an appropriate page, you are invited to your to this massmind site! (posts will be visible only to you before review) Just type a nice message (short messages are blocked as spam) in the box and press the Post button. (HTML welcomed, but not the <A tag: Instead, use the link box to link to another page. A tutorial is available Members can login to post directly, become page editors, and be credited for their posts.


Link? Put it here: 
if you want a response, please enter your email address: 
Attn spammers: All posts are reviewed before being made visible to anyone other than the poster.
Did you find what you needed?

 

Welcome to massmind.org!

 

Welcome to techref.massmind.org!

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

  .