[Tutor] Fw: BCD Ascii to a binary hex value
Deirdre Hackett
Deirdre Hackett" <deirdrehac@lycos.co.uk
Tue Feb 18 10:15:02 2003
This is a multi-part message in MIME format.
------=_NextPart_000_004C_01C2D760.FA3E14C0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
----- Original Message -----=20
From: Deirdre Hackett=20
To: jtodora@fast.net=20
Sent: Tuesday, February 18, 2003 3:17 PM
Subject: BCD Ascii to a binary hex value
Table
BCD ASCII Binary value(Hex)
value High byte Low Byte
30,000 75 30
22,500 57 E4
15,000 3A 98
7,500 1D 4C
00 00 00
- 7,500 E2 B4=20
- 15,000 C3 74
- 22,500 A8 1C
- 30,000 8A D0
I can convert from the BCD ascii for the positive normally using binary =
and for the negative numbers using twos complement but I do not know how =
to convert from the binary value to the BCD ASCII just using just a pen =
and paper as I want to write a program to convert them.
Just thought you might give me some guidance if you can.
Thanks,
Deirdre Hackett
------=_NextPart_000_004C_01C2D760.FA3E14C0
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content=3D"text/html; charset=3Diso-8859-1" =
http-equiv=3DContent-Type>
<META content=3D"MSHTML 5.00.2614.3500" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV> </DIV>
<DIV style=3D"FONT: 10pt arial">----- Original Message -----=20
<DIV style=3D"BACKGROUND: #e4e4e4; font-color: black"><B>From:</B> <A=20
href=3D"mailto:deirdrehac@lycos.co.uk" =
title=3Ddeirdrehac@lycos.co.uk>Deirdre=20
Hackett</A> </DIV>
<DIV><B>To:</B> <A href=3D"mailto:jtodora@fast.net"=20
title=3Djtodora@fast.net>jtodora@fast.net</A> </DIV>
<DIV><B>Sent:</B> Tuesday, February 18, 2003 3:17 PM</DIV>
<DIV><B>Subject:</B> BCD Ascii to a binary hex value</DIV></DIV>
<DIV><BR></DIV>
<DIV><FONT face=3DArial size=3D2>Table</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=3DArial size=3D2>BCD ASCII =
=20
=
=20
Binary value(Hex)</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>value =
=20
=
=20
High byte =20
Low Byte</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>30,000 =
=20
=
=20
75 =
=20
30</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>22,500 =
=20
=
=20
57 =
=20
E4</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>15,000 =
=20
=
=20
3A =
=20
98</FONT></DIV>
<DIV><FONT face=3DArial=20
size=3D2>7,500  =
; =
1=
D</FONT><FONT=20
face=3DArial=20
size=3D2> &nbs=
p; =20
4C</FONT></DIV>
<DIV><FONT face=3DArial=20
size=3D2>00 &n=
bsp; &nb=
sp; &nbs=
p; 00 =20
=
=20
00</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>-=20
7,500 &n=
bsp; &nb=
sp; E2 &n=
bsp; &nb=
sp; =20
B4=20
<DIV><FONT face=3DArial size=3D2>-=20
15,000 &=
nbsp; &n=
bsp; C3 &=
nbsp; &n=
bsp; =20
74</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>- =
22,500 =20
&=
nbsp; A8 =
=20
=
=20
1C</FONT></FONT></DIV></DIV>
<DIV><FONT face=3DArial size=3D2>-=20
30,000 &=
nbsp; &n=
bsp; 8A =20
=
=20
D0</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=3DArial size=3D2>I can convert from the BCD ascii for =
the positive=20
normally using binary and for the negative numbers using twos complement =
but I=20
do not know how to convert from the binary value to the BCD ASCII just =
using=20
just a pen and paper as I want to write a program to convert =
them.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>Just thought you might give me some =
guidance if you=20
can.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>Thanks,</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>Deirdre =
Hackett</FONT></DIV></BODY></HTML>
------=_NextPart_000_004C_01C2D760.FA3E14C0--