Bde Unit 1
Bde Unit 1
INTRODUCTION:
The binary system is a way of representing data using 0s and 1s. This system is used by computers
to represent all the data it works with. To compute a number in this system, you would multiply
the digit value by the place value, then add them all together.
NUMBER SYSTEM:
1. DECIMAL NUMBER SYSTEM
2. BINARY NUMBER SYSTEM
3. OCTAL NUMBER SYSTEM
4. HEXADECIMAL NUMBER SYSTEM
In the decimal number system, the numbers are represented with base 10. The way of denoting the
decimal numbers with base 10 is also termed as decimal notation. This number system is widely
used in computer applications. It is also called the base-10 number system which consists of 10
digits, such as, 0,1,2,3,4,5,6,7,8,9. Each digit in the decimal system has a position and every digit
is ten times more significant than the previous digit. Suppose, 25 is a decimal number, then 2 is
ten times more than 5. Some examples of decimal numbers are:-
(12)10, (345)10, (119)10, (200)10, (313.9)10
A number system which uses digits from 0 to 9 to represent a number with base 10 is the decimal
system number. The number is expressed in base-10 where each value is denoted by 0 or first nine
positive integers. Each value in this number system has the place value of power 10. It means the
digit at the tens place is ten times greater than the digit at the unit place. Let us see some more
examples:
(92)10 = 9×101+2×100
(200)10 = 2×102+0x101+0x100
The decimal numbers which have digits present on the right side of the decimal (.) denote each
digit with decreasing power of 10. Some examples are
(30.2)10= 30×101+0x100+2×10-1
(212.367)10
= 2×102+1×101+2×100+3×10-1+6×10-2+7×10-3
There are many methods or techniques which can be used to convert numbers from one base to
another. We'll demonstrate here the following −
Steps
Step 1 − Divide the decimal number to be converted by the value of the new base.
Step 2 − Get the remainder from Step 1 as the rightmost digit (least significant digit) of
new base number.
Step 3 − Divide the quotient of the previous divide by the new base.
Step 4 − Record the remainder from Step 3 as the next digit (to the left) of the new base
number.
Repeat Steps 3 and 4, getting remainders from right to left, until the quotient becomes zero in Step
3.
The last remainder thus obtained will be the Most Significant Digit (MSD) of the new base number.
Example −
Decimal Number: 2910
Calculating Binary Equivalent −
Step 1 29 / 2 14 1
Step 2 14 / 2 7 0
Step 3 7/2 3 1
Step 4 3/2 1 1
Step 5 1/2 0 1
As mentioned in Steps 2 and 4, the remainders have to be arranged in the reverse order so that the
first remainder becomes the Least Significant Digit (LSD) and the last remainder becomes the
Most Significant Digit (MSD).
Decimal Number − 2910 = Binary Number − 111012.
Steps
Step 1 − Determine the column (positional) value of each digit (this depends on the position
of the digit and the base of the number system).
Step 2 − multiply the obtained column values (in Step 1) by the digits in the corresponding
columns.
Step 3 − Sum the products calculated in Step 2. The total is the equivalent value in decimal.
Example
Binary Number − 111012
Calculating Decimal Equivalent −
Steps
Step 1 − Convert the original number to a decimal number (base 10).
Step 2 − Convert the decimal number so obtained to the new base number.
Example
Octal Number − 258
Calculating Binary Equivalent −
Step 1 − Convert to Decimal
Step Octal Number Decimal Number
Step 1 21 / 2 10 1
Step 2 10 / 2 5 0
Step 3 5/2 2 1
Step 4 2/2 1 0
Step 5 1/2 0 1
Steps
Step 1 − Divide the binary digits into groups of three (starting from the right).
Step 2 − Convert each group of three binary digits to one octal digit.
Example
Binary Number − 101012
Calculating Octal Equivalent −
Step 2 101012 28 58
Steps
Step 1 − Convert each octal digit to a 3 digit binary number (the octal digits may be treated
as decimal for this conversion).
Step 2 − Combine all the resulting binary groups (of 3 digits each) into a single binary
number.
Example
Octal Number − 258
Calculating Binary Equivalent −
Steps
Step 1 − Divide the binary digits into groups of four (starting from the right).
Step 2 − Convert each group of four binary digits to one hexadecimal symbol.
Example
Binary Number − 101012
Calculating hexadecimal Equivalent −
Steps
Step 1 − Convert each hexadecimal digit to a 4 digit binary number (the hexadecimal digits
may be treated as decimal for this conversion).
Step 2 − Combine all the resulting binary groups (of 4 digits each) into a single binary
number.
Example
Hexadecimal Number − 1516
Calculating Binary Equivalent −
Binary Addition
It is a key for binary subtraction, multiplication, division. There are four rules of binary addition.
In fourth case, a binary addition is creating a sum of (1 + 1 = 10) i.e. 0 is written in the given
column and a carry of 1 over to the next column.
Example − Addition
Binary Subtraction
Subtraction and Borrow, these two words will be used very frequently for the binary subtraction.
There are four rules of binary subtraction.
Example − Subtraction
Binary Multiplication
Example − Multiplication
Binary Division
Binary division is similar to decimal division. It is called as the long division procedure.
Example − Division
1’s complement of a binary number is another binary number obtained by toggling all bits in it,
i.e., transforming the 0 bit to 1 and the 1 bit to 0.In the 1’s complement format , the positive
numbers remain unchanged . The negative numbers are obtained by taking the 1’s complement
of positive counterparts.
For example +9 will be represented as 00001001 in eight-bit notation and -9 will be represented
as 11110110, which is the 1’s complement of 00001001.
Examples:
1's complement of "0111" is "1000"
1's complement of "1100" is “0011"
2’s complement of a binary number is 1, added to the 1’s complement of the binary number. In
the 2’s complement representation of binary numbers, the MSB represents the sign with a ‘0’
used for plus sign and a ‘1’ used for a minus sign. The remaining bits are used for representing
magnitude. Positive magnitudes are represented in the same way as in the case of sign-bit or 1’s
complement representation. Negative magnitudes are represented by the 2’s complement of
their positive counterparts.
Examples:
2's complement of "0111" is “1001"
2's complement of "1100" is “0100"