Binary Codes
Binary Codes
FINALS
HE L LO
0100 1000 0100 0101 0100 1100 0100 1100 0100 1111
The utility of mathematics goes beyond the mundane (dull and
ordinary). Mathematics enables the development of codes and ciphers (
a way of changing message to keep it secret) that are
useful to individuals and to society.
Unicode Unicode
code in hex (hex)
Binary Code
Is the simplest form of computer code or programming
data. It is represented entirely by a binary systems of digits
consisting of a string of consecutive zeros and ones. Binary code
is often associated with machine code in that binary sets can be
combined to form raw code, which is interpreted by a computer
or other piece of hardware.
Binary Number System
The binary number system is a numbering system that
represents numeric values using two unique digits (0 and 1).
Most computing device use binary numbering to represent
electronic circuit voltage state. (i.e., on/off switch), which
considers 0 voltage input as off and 1 input as on. This is also
known as the base-2 numbering system, or the binary
numbering system.
Binary File
A binary file is a type of computer file that is used to store binary data. It may contain
any type of formatted or unformatted data encoded within binary format. It is used directly
by the computer and generally can’t be read by human. Binary files can also be called
binaries.
A binary file may consist of binary data stored by the computer or non-binary data
converted or encoded into binary data. A binary file generally remains native and resident
within the computer, but it can be converted/encoded to plain text if it needs to be
transmitted over a network/internet connection. A computer program file is one of the most
common examples of a binary file.
Binary Digit (Bit)
142
Decimal to binary
1. 50 = 1 1 0010
2. 23 = 1 0111
3. 45 = 1 0 1101
4. 81 = 1 0 1 0001
5. 64 = 1 0 0 0000
Binary to decimal
6. 1 1 0 0 0 1 1 = 99
7. 1 1 0 0 1 1 0 = 102
8. 1 0 0 0 0 0 = 32
9. 1 0 1 1 = 11
10. 1 1 0 0 1 = 25
Addition of Binary Number
To add binary number,
0+0=0
1+0=1
0+1=1
1 + 1 = 10
1 + 1 + 1 = 11
a. 1 0 1 0 + 1 0 1 0 = 1 0 1 0 0
b. 1 1 1 0 1 + 1 0 1 0 = 1 0 0 1 1 1
c. 1 1 1 1 1 + 1 1 1 1 1 = 1 1 1 1 1 0
Subtraction of Binary Number
To subtract binary number,
1-1=0
0-0=0
1-0=1
0 - 1 = 1 but carry is required 10 – 1 = 1
• Example1:
1 0 1 1 1 = 16 + 4 + 2 + 1 = 23
- 1 0 1 0 1 = 16 + 4 + 1 = 21
0 0 0 1 0 =2 =2
Example2:
e. 1 0 0 0 1 - 1 0 0 = 1 1 0 1
Multiplication of Binary Numbers
To multiply binary number, we will do the same process as
decimals.
0 1 0 1 =4+1 =5
x 1 0 1 1 =8+2+1 = 11
0 1 0 1 55
0 1 0 1
0 0 0 0
0 1 0 1 .
1 1 0 1 1 1 = 32 + 16 + 4 + 2 + 1 = 55
f. 1 0 1 x 1 0 = 1 0 1 0
g. 1 0 1 1 x 1 1 = 1 0 0 0 0 1
Division of Binary Numbers
h. 1 0 1 1 1 1 / 1 0 = 1 0 1 1 1
ENCODING AND DECODING
Encoding as an element of communication is the process of
assembling the message (information, ideas, and thoughts) into a
representative design with the objective of ensuring that the receiver can
comprehend it. While, decoding is listening and reading directions
carefully.
In computer application, encoding is the process of converting the
characters to integers and decoding converts back to characters.