You are on page 1of 10

BINARY

CODE Juzen A. Lusica


Mary Grace E. Salavaria
Objectives
• Define what is a Binary Code

• Learn how to calculate a binary code

• Learn how to write in binary numbers and


transform a binary code to an English
Language Letters
BINARY CODE
is a base 2 number system invented by Gottfried
Leibniz where numeric values are represented by different
combinations of 0 and 1, also known as OFF or ON.

Is the simplest form of computer code or programming


data.
HOW TO READ A BINARY CODE
The following chart illustrates the binary number 01101000. In
this example, we get the total value by reading the chart
from right to left and adding each column's value to that of the
previous column: (8+32+64) = 104. As you can see, we do not
count the bits with a 0 because they're "turned off."

VALUE 128 64 32 16 8 4 2 1

ON/OFF 0 1 1 0 1 0 0 0
CONVERTING A TEXT
INTO A BINARY CODE

In converting a text to binary code we will


use the ASCII or American Standard Code for
Information Interchange. ASCII codes represent
text in computers, telecommunications
equipment, and other devices. Most modern
character-encoding schemes are based on ASCII,
although they support many additional characters
ASCII
Decima Decim
Letter Code Letter Code
l al
A 01000001 65 N 01001110 78
B 01000010 66 O 01001111 79
C 01000011 67 P 01010000 80
D 01000100 68 Q 01010001 81
E 01000101 69 R 01010010 82
F 01000110 70 S 01010011 83
G 01000111 71 T 01010100 84
H 01001000 72 U 01010101 85
I 01001001 73 V 01010110 86
J 01001010 74 W 01010111 87
K 01001011 75 X 01011000 88
L 01001100 76 Y 01011001 89
M 01001101 77 Z 01011010 90
EXAMPLE:
1. Convert the word CAT into a binary code.
First, we need to identify first the binary number of
each letter in the word CAT.
In the letter C base on the ASCII it is equal to 67
VALUE 128 64 32 16 8 4 2 1
ON/OFF 0 1 0 0 0 0 1 1
In the letter A base on the ASCII it is equal to 65
VALUE 128 64 32 16 8 4 2 1
ON/OFF 0 1 0 0 0 0 0 1
In the letter T base on the ASCII it is equal to 84
VALUE 128 64 32 16 8 4 2 1
ON/OFF 0 1 0 1 0 1 0 0
Lastly, we will just combine their binary
numbers.
C A T
01000011 01000001 01010100

Hence, the binary code of CAT is 010000110100000101010100.

2. Translate this binary code


01010011010101000100010101001101 into a word.
01010011 01010100 01000101 01001101
VALUE 128 64 32 16 8 4 2 1
64+16+2+1=83
ON/OFF 0 1 0 1 0 0 1 1 S

VALUE 128 64 32 16 8 4 2 1 64+16+4=84


ON/OFF 0 1 0 1 0 1 0 0 T

VALUE 128 64 32 16 8 4 2 1
64+4+1=69
ON/OFF 0 1 0 0 0 1 0 1 E

VALUE 128 64 32 16 8 4 2 1 64+8+4+1=77


M
ON/OFF 0 1 0 0 1 1 0 1

Hence, the word STEM is the text of the binary code


01010011010101000100010101001101

You might also like