How to Convert Binary to ASCII

Author

CODINASION

Published on Jan 26, 2022

Converting binary to ASCII is a common task in computer programming. Binary is a base-2 number system that uses only two digits, 0 and 1. ASCII, on the other hand, is a character encoding standard that assigns a unique number to each character. Converting binary to ASCII involves converting each group of 8 bits (1 byte) to its corresponding ASCII character.

Conversion

Here's a step-by-step guide on how to convert binary to ASCII:

  1. Choose the binary value you want to convert to ASCII.
  2. Divide the binary value into groups of 8 bits (1 byte).
  3. Convert each group of 8 bits to its decimal value using the binary-to-decimal conversion method.
  4. Look up the ASCII character corresponding to each decimal value using an ASCII table.

Example

Let's walk through an example to illustrate the process. Suppose we want to convert the binary value 10000010100001001000011 to ASCII.

  1. The binary value we want to convert is 10000010100001001000011.
  2. We divide the binary value into groups of 8 bits: 01000001, 01000010, and 01000011.
  3. We convert each group of 8 bits to its decimal value using the binary-to-decimal conversion method. The decimal values are 65, 66, and 67.
  4. We look up the ASCII character corresponding to each decimal value using an ASCII table. The ASCII characters are 'A', 'B', and 'C'.
  5. The ASCII representation of the binary value 10000010100001001000011 is "ABC".

ASCII-Binary Table

Here's a table of the ASCII characters and their corresponding binary values:

CharacterDescriptionDecimalBinary
0Zero4800110000
1One4900110001
2Two5000110010
3Three5100110011
4Four5200110100
5Five5300110101
6Six5400110110
7Seven5500110111
8Eight5600111000
9Nine5700111001
ACapital A6501000001
BCapital B6601000010
CCapital C6701000011
DCapital D6801000100
ECapital E6901000101
FCapital F7001000110
GCapital G7101000111
HCapital H7201001000
ICapital I7301001001
JCapital J7401001010
KCapital K7501001011
LCapital L7601001100
MCapital M7701001101
NCapital N7801001110
OCapital O7901001111
PCapital P8001010000
QCapital Q8101010001
RCapital R8201010010
SCapital S8301010011
TCapital T8401010100
UCapital U8501010101
VCapital V8601010110
WCapital W8701010111
XCapital X8801011000
YCapital Y8901011001
ZCapital Z9001011010
aSmall a9701100001
bSmall b9801100010
cSmall c9901100011
dSmall d10001100100
eSmall e10101100101
fSmall f10201100110
gSmall g10301100111
hSmall h10401101000
iSmall i10501101001
jSmall j10601101010
kSmall k10701101011
lSmall l10801101100
mSmall m10901101101
nSmall n11001101110
oSmall o11101101111
pSmall p11201110000
qSmall q11301110001
rSmall r11401110010
sSmall s11501110011
tSmall t11601110100
uSmall u11701110101
vSmall v11801110110
wSmall w11901110111
xSmall x12001111000
ySmall y12101111001
zSmall z12201111010

See full ascii table here.

References

Heart with ribbonBecome a SponsorHeart with ribbon

Become a sponsor and help us maintain and improve this project. Every contribution counts. Thank you!