You are on page 1of 15

01100011 01101111 01101101 01110000 01110101 01110100 01100101

01110010

c hexa is 63 binary is 0110 0011


Computers convert text and other data into binary by using an assigned ASCII value. Once the ASCII
value is known that value can be converted into binary.

In the following example, we take the word hope, and show how it is converted into binary that
the computer understands.

Let's take the first character h and break down the process. Once the letter h (in lowercase) is
typed on the keyboard, a signal to the computer as input. The computer knows the ASCII
standard value for h is 104, which can be converted by the computer into the binary value
01101000. After the h is converted to binary, the computer can store and process the data as ones
and zeros.

When storing this data, each character takes 8 bits (1 byte), which means to store hope as
plaintext it would take 4 bytes or 32-bits.

What is Number System?


A number system is a collection of various symbols which are called digits.
What is the difference between bits and bytes?
• Have you ever heard of words bits and bytes? Have you heard of an advertisement that says,
"This computer has a 64-bit Pentium IV processor with 256 mega-bytes of RAM and 100 giga-
bytes of hard disk space."

Answer: Bits and Bytes both measure amounts of data. However, they are typically used in two
different contexts.

Bits, kilobits (Kbps), and megabits (Mbps) are most often used to measure data transfer speeds.
This may refer to how fast you are downloading a file, or how fast your Internet connection is.
For example, if you are downloading a file on cable modem, your download speed might be
240Kbps. This is much faster than a dial-up modem, which maxes out at 56Kbps.

Bytes, on the other hand, are used to measure data storage. For example, a CD holds 700MB
(megabytes) of data and a hard drive may hold 250GB (gigabytes). The other important
difference is that bytes contain eight bits of data. Therefore, a 240Kbps download is only
transferring 30KB of data per second. However, kilobytes per second is not as commonly used as
kilobits per second for measuring data transfer speeds. After all, using kilobits per second (Kbps)
makes your connection sound eight times faster!

It is important to know that bytes are abbreviated with a capital B, where as bits use a lowercase
b. Therefore, Mbps is megabits per second, and MBps is megabytes per second. So 8Mbps is
equal to 1MBps.

Base 2, the Basis for Binary Code


The base 2, or binary numbering system is the basis for all binary code and data storage in
computing systems and electronic devices. This guide shows you how to convert from binary to
decimal and decimal to binary.
Binary number and its decimal equivalent.

Decimal, the Base 10 Numbering System


First let's start with decimal.

The decimal, also known as the denary or base 10 numbering system is what we use in everyday
life for counting. The fact that there are ten symbols is more than likely because we have 10
fingers.

We use ten different symbols or numerals to represent the numbers from zero to nine.

Those numerals are 0, 1, 2, 3, 4, 5, 6, 7, 8 and 9

When we get to the number ten, we have no numeral to represent this value, so it is written as:

10
The idea is to use a new place holder for each power of 10 to make up any number we want.

So 134 means one hundred, 3 tens and a 4 although we just interpret and read it as one hundred
and thirty four.

Placeholder Value in the Decimal Numbering System

Placeholder value in the base 10 number system

Binary, the Base 2 Numbering System


In the decimal number system, we saw that ten numerals were used to represent numbers from
zero to nine.

Binary only uses two numerals 0 and 1. Place holders in binary each have a value of powers of 2.
So the first place has a value 20 = 1, the second place 21 = 2, the third place 22 = 4, the fourth
place 23 = 8 and so on.

In binary we count 0, 1 and then since there's no numeral for two we move onto the next place
holder so two is written as 10 binary. This is exactly the same as when we get to ten decimal and
have to write it as 10 because there's no numeral for ten.

Placeholder Value in the Binary Numbering System


Placeholder value in the binary number system | Source

Most Significant Bit (MSB) and Least Significant Bit (LSB)


For a binary number, the most significant bit (MSB) is the digit furthermost to the left of the
number and the least significant bit (LSB) is the rightmost digit.
Most significant bit (MSB) and least significant bit (LSB). | Source

Decimal and Binary Equivalents


Decimal Binary
0 0
1 1
2 10
3 11
4 100
5 101
6 110
7 111
8 1000

Steps to Convert from Decimal to Binary


If you don't have a calculator to hand, you can easily convert a decimal number to binary using
the remainder method. This involves dividing the number by 2 recursively until you're left with
0, while taking note of each remainder.

1. Write down the decimal number.


2. Divide the number by 2.
3. Write the result underneath.
4. Write the remainder on the right hand side. This will be 0 or 1.
5. Divide the result of the division by 2 and again write down the remainder.
6. Continue dividing and writing down remainders until the result of the division is 0.
7. The most significant bit (MSB) is at the bottom of the column of remainders and the least
significant bit (LSB) is at the top.
8. Read the series of 1s and 0s on the right from the bottom up. This is the binary equivalent
of the decimal number.
Converting decimal to binary

Steps to Convert Binary to Decimal


Converting from binary to decimal involves multiplying the value of each digit (i.e. 1 or 0) by
the value of the placeholder in the number

1. Write down the number.


2. Starting with the LSB, multiply the digit by the value of the place holder.
3. Continue doing this until you reach the MSB.
4. Add the results together.
Converting binary to decimal

Indicating the Base of a Number


The binary number 1011011 can be written as 10110112 to explicitly indicate the base. Similarly
54 base 10 can be written 5410 Often however, the subscript is omitted to avoid excessive detail
when the context is known. Usually subscripts are only included in explanatory text or notes in
code to avoid confusion if several numbers with different bases are used together.

What is Binary Used For?


The binary numbering system, is the basis for storage, transfer and manipulation of data in computer
systems and digital electronic devices. This system uses base 2 rather than base 10 which we are familiar
with for counting in everyday life. By the end of this easy to understand article, you'll have a grasp of
why binary is used in computers and electronics.

What is Decimal and Why Do We Use It?


The decimal, base 10 or denary numbering system is what we are familiar with in everyday life.
It uses 10 symbols or numerals. So you count 0,1,2,3,4,5,6,7,8,9 and when you get to 9, there is
no numeral for the next number ten, so ten is represented by two digits, the numeral 1 followed
by 0 or "10", which really means "one ten and no units". Similarly when you get to 99, one
hundred is represented by three digits 1, 0 and 0 i.e "100 which is interpreted as "one hundred,
no tens and no units". So basically numbers are represented by a series of numerals in the units,
tens, hundreds, thousands place etc. So for instance 134 means "one hundred, three tens and four
units. The decimal system probably arose because we have 10 fingers on our hands which could
be used for counting.

What is Binary and How Does it Work?


The binary system used by computers is based on 2 numerals; 0 and 1. So you count 0, 1, there is
no numeral for 2, so 2 is represented by 10 or "one 2 and no units". In the same way that there is
a units, tens, hundreds, thousands place in the decimal system, in the binary system there is a
units, twos, fours, eights, sixteens place etc. in the binary system. So the binary and decimal
equivalents are as below:

00000000 0

00000001 1

00000010 2

00000011 3

00000100 4

00000101 5

00000110 6

00000111 7 and so on

Conversion from Binary to Octal number system


Octal number system provides convenient way of converting large binary numbers into more
compact and smaller groups. There are various ways to convert a binary number into octal
number. You can convert using direct methods or indirect methods. First, you need to convert a
binary into other base system (e.g., into decimal, or into hexadecimal). Then you need to convert
it octal number.
The octal numeral system, or oct for short, is the base-8 number system, and uses the digits 0 to
7. Octal numerals can be made from binary numerals by grouping consecutive binary digits into
groups of three (starting from the right). For example, the binary representation for decimal 74 is
1001010. Two zeroes can be added at the left: (00)1 001 010, corresponding the octal digits 1 1
2, yielding the octal representation 112.

In the decimal system each decimal place is a power of ten. For example:

In the octal system each place is a power of eight. For example:

Using Grouping
Since, there are only 8 digits (from 0 to 7) in octal number system, so we can represent any digit
of octal number system using only 3 bit as following below.

Octal Digit Value Binary Equivalent


0 000
1 001
2 010
3 011
4 100
5 101
6 110
7 111

So, if you make each group of 3 bit of binary input number, then replace each group of binary
number from its equivalent octal digits. That will be octal number of given number number. Note
that you can add any number of 0’s in leftmost bit (or in most significant bit) for integer part and
add any number of 0’s in rightmost bit (or in least significant bit) for fraction part for completing
the group of 3 bit, this does not change value of input binary number.

So, these are following steps to convert a binary number into octal number.

 Take binary number


 Divide the binary digits into groups of three (starting from right) for integer part and start
from left for fraction part.
 Convert each group of three binary digits to one octal digit.
This is simple algorithm where you have to grouped binary number and replace their equivalent
octal digit.

Example-1 − Convert binary number 1010111100 into octal number. Since there is no binary
point here and no fractional part. So,

Therefore, Binary to octal is.

= (1010111100)2
= (001 010 111 100)2
= (1 2 7 4)8
= (1274)8

Hexadecimal, the Base 16 Numbering System


Hexadecimal or "hex" is a numbering system which uses 16 different numerals. We saw that
decimal used ten numerals from 0 to 9. Hex expands on this by adding six more, the capital
letters A, B, C, D, E and F.

So to count from 0 to 15 you go 0...1...2...3...4...5...6...7...8...9

But what happens next?

Simply continue with A...B...C...D...E...F which represents 10, 11, 12, 13, 14 and 15 decimal.

In the decimal system, we saw that when we got to nine, there was no numeral for ten so it was
represented as 10 or "one ten and no units".

In the hex system when we get to F which is 15 decimal, we have to represent the next number
sixteen as 10 or "one 16 and no units".
Steps to Convert Hex to Binary
Hex is very easy to convert to binary.

1. Write down the hex number and represent each hex digit by its binary equivalent number
from the table above.
2. Use 4 digits and add insignificant leading zeros if the binary number has less than 4
digits. E.g. Write 102 (2 decimal) as 00102.
3. Then concatenate or string all the digits together.
4. Discard any leading zeros at the left of the binary number.
Converting hex to binary | Source

Most Significant Bit (MSB) and Least Significant Bit (LSB)


For a binary number, the most significant bit (MSB) is the digit furthermost to the left of the
number and the least significant bit (LSB) is the rightmost digit.
Most significant bit (MSB) and least significant bit (LSB). | Source

Steps to Convert Binary to Hex


Binary is also easy to convert to hex.

1. Start from the least significant bit (LSB) at the right of the binary number and divide it up
into groups of 4 digits. (4 digital bits is called a "nibble").
2. Convert each group of 4 binary digits to its equivalent hex value (see table above).
3. Concatenate the results together, giving the total hex number.
What Other Bases Are There Apart From 2 and 10?
Base 16 or hexadecimal (hex for short) is a shorthand used when programming computer
systems. It uses sixteen symbols, representing 10, 11, 12, 13, 14 and 15 decimal with the letters
A, B, C, D, E, and F respectively. You can read more about converting hex to binary and binary
to hex here:

You might also like