# Binary Conversion In Digital System and Numbering System

Binary Conversion
Unsigned Binary Counting
The simplest form of numeric representation with bits is unsigned binary. When we count upward through the positive integers using decimal, we start with a 0 in the one’s place and increment that value until we reach the upper limit of a single digit, i.e., 9. At that point, we’ve run out of the “symbols” we use to count, and we need to increment the next digit, the ten’s place. We then reset the one’s place to zero, and start the cycle again. Since computers do not have an infinite number of transistors, the number of digits that can be used to represent a number is limited. This would be like saying we could only use the hundreds, tens, and ones place when counting in decimal. This has two results. First, it limits the number of values we can represent. For our example where we are only allowed to count up to the hundreds place in decimal, we would be limited to the range of values from 0 to 999.
Second, we need a way to show others that we are limiting the number of digits. This is usually done by adding leading zeros to the number to fill up any unused places. For example, a decimal 18 would be written 018 if we were limited to three decimal digits. Counting with bits, hereafter referred to as counting in binary, is subject to these same issues.
The only difference is that decimal uses ten symbols (0, 1, 2, 3, 4, 5, 6, 7, 8, and 9) while binary only uses two symbols (0 and 1). In binary, the rightmost place is considered the ones place just like decimal. The next place is incremented after the ones place reaches 1.
This means that the second place in binary represents the value after 1, i.e., a decimal 2. The third place is incremented after a 1 is in both the ones place and the twos place, i.e., we’ve counted to a decimal 3. Therefore, the third place represents a decimal 4. Continuing this process shows us that each place in binary represents a successive power of two.
Table Below uses 5 bits to count up to a decimal 17. Examine each row where a single one is present in the binary number. This reveals what that position represents. For example, a binary 01000 is shown to be equivalent to a decimal 8. Therefore, the fourth bit position from the right is the 8’s position. This information will help us develop a method for converting unsigned binary numbers to decimal and back to unsigned binary. Some of you may recognize this as “base-2” math. This gives us a method for indicating which representation is being used when writing a number down on paper.
For example, does the number 100 represent a decimal value or a binary value? Since binary is base-2 and decimal is base-10, a subscript “2” is placed at the end of all binary numbers in this book and a subscript “10” is placed at the end of all decimal numbers. This means a binary 100 should be written as 1002 and a decimal 100 should be written as 10010.
Converting binary to decimal
To convert binary into decimal is very simple and can be done as shown below: Say we want to convert the 8 bit value 10011101 into a decimal value, we can use a formula like that below:
 128 64 32 16 8 4 2 1 1 0 0 1 1 1 0 1
As you can see we have placed the numbers 1, 2, 4, 8, 16, 32, 64, 128 (powers of two) in reverse numerical order and then written the binary value below, to convert you simply take a value from the top row wherever there is a 1 below and add the values together, for instance in our example we would have 128 + 16 + 8 + 4 + 1 = 157.
For a 16 bit value you would use the decimal values 1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048, 4096, 8192, 16384, 32768 (powers of two) for the conversion.
Because we know binary is base 2 then the above could be written as:
1*27 + 0*26 + 0*25 + 1*24 + 1*23 + 1*22 + 0*21 + 1*20 = 157.
Converting decimal to binary
To convert decimal to binary is also very simple, you simply divide the decimal value by 2 and then write down the remainder, repeat this process until you cannot divide by 2 anymore,
For example let’s take the decimal value 157:
 157 / 2 = 78 78 / 2 = 39 39 / 2 = 19 19 / 2 = 9 9 / 2 = 4 4 / 2 = 2 2 / 2 = 1 1 / 2 = 0 with a remainder of 1 with a remainder of 0 with a remainder of 1 with a remainder of 1 with a remainder of 1 with a remainder of 0 with a remainder of 0 with a remainder of 1 <— to convert write this remainder first.
Next write down the value of the remainders from bottom to top (in other words write down the bottom remainder first and work your way up the list) which gives:
10011101 = 157
Binary Terminology
When writing values in decimal, it is common to separate the places or positions of large numbers in groups of three digits separated by commas. For example, 34532374510 is typically written 345,323,74510 showing that there are 345 millions, 323 thousands, and 745 ones. This practice makes it easier to read and comprehend the magnitude of the numbers.
Binary numbers are also divided into components depending on their application. Each binary grouping has been given a name. To begin with, a single place or position in a binary number is called a bit, short for binary digit. For example, the binary number 01102 is made up of four bits. The rightmost bit, the one that represents the ones place, is called the Least Significant Bit or LSB.
The leftmost bit, the one that represents the highest power of two for that number, is called the Most Significant Bit or MSB. Note that the MSB represents a bit position. It doesn’t mean that a ‘1’ must exist in that position. The next four terms describe how bits might be grouped together.
Highest power of two for that number is called the Most Significant Bit or MSB. Note that the MSB represents a bit position. It doesn’t mean that a ‘1’ must exist in that position. The next four terms describe how bits might be grouped together.
• Nibble – A four bit binary number

Byte – A unit of storage for a single character, typically an eight bit (2 nibble) binary number (short for binary term)

• Word – Typically a sixteen bit (2 byte) binary number

• Double Word – A thirty-two bit (2 word) binary number

The following are some examples of each type of binary number:
 Bit 12 Nibble 10102 Byte 101001012 Word 10100101111100002 Double Word 101001011111000011001110111011012

## Cache RAM

Cache RAM Even with increases in hard drive performance, it will never be practical to …