0% found this document useful (0 votes)
8 views10 pages

Bde Unit 1

Uploaded by

rahul thumar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
8 views10 pages

Bde Unit 1

Uploaded by

rahul thumar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 10

BDE CHAPTER-1 SUBJECT CODE: 4320703

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

1. DECIMAL 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

V.P.M.P POLYTECHNICS ELECTRICAL DEPARTMENT


BDE CHAPTER-1 SUBJECT CODE: 4320703

(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

2. BINARY NUMBER SYSTEM:


A binary number system is one of the four types of number system. In computer applications,
where binary numbers are represented by only two symbols or digits, i.e. 0 (zero) and 1(one).
The binary numbers here are expressed in the base-2 numeral system. For example, (101) 2 is a
binary number.

3. OCTAL NUMBER SYSTEM:


A number system which has its base as 'eight' is called an octal number system. It uses numbers
from 0 to 7. Let us take an example, to understand the concept. As we said, any number with base
8 is an octal number like 248, 1098, 558, etc.

4. HEXADECIMAL NUMBER SYSTEM:


The hexadecimal number system is a type of number system that has a base value equal to 16. It
is also pronounced sometimes as 'hex'. Hexadecimal numbers are represented by only 16
symbols. These symbols or values are 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E and F.

CONVERSION OF NUMBER FROM ONE SYSTEM TO OTHER


SYSTEM:

There are many methods or techniques which can be used to convert numbers from one base to
another. We'll demonstrate here the following −

 Decimal to Other Base System


 Other Base System to Decimal
 Other Base System to Non-Decimal
 Shortcut method − Binary to Octal
 Shortcut method − Octal to Binary
 Shortcut method − Binary to Hexadecimal
 Shortcut method − Hexadecimal to Binary

Decimal to Other Base System

V.P.M.P POLYTECHNICS ELECTRICAL DEPARTMENT


BDE CHAPTER-1 SUBJECT CODE: 4320703

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 Operation Result Remainder

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.

Other Base System to Decimal System

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 −

V.P.M.P POLYTECHNICS ELECTRICAL DEPARTMENT


BDE CHAPTER-1 SUBJECT CODE: 4320703

Step Binary Number Decimal Number

Step 1 111012 ((1 × 24) + (1 × 23) + (1 × 22) + (0 × 21) + (1 × 20))10

Step 2 111012 (16 + 8 + 4 + 0 + 1)10

Step 3 111012 2910

Binary Number − 111012 = Decimal Number − 2910

Other Base System to Non-Decimal System

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 258 ((2 × 81) + (5 × 80))10

Step 2 258 (16 + 5 )10

Step 3 258 2110

Octal Number − 258 = Decimal Number − 2110


Step 2 − Convert Decimal to Binary
Step Operation Result Remainder

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

Decimal Number − 2110 = Binary Number − 101012


Octal Number − 258 = Binary Number − 101012

V.P.M.P POLYTECHNICS ELECTRICAL DEPARTMENT


BDE CHAPTER-1 SUBJECT CODE: 4320703

Shortcut method - Binary to Octal

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 Binary Number Octal Number

Step 1 101012 010 101

Step 2 101012 28 58

Step 3 101012 258

Binary Number − 101012 = Octal Number − 258

Shortcut method - Octal to Binary

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 −

Step Octal Number Binary Number

Step 1 258 210 510

Step 2 258 0102 1012

Step 3 258 0101012

Octal Number − 258 = Binary Number − 101012

Shortcut method - Binary to Hexadecimal

Steps

V.P.M.P POLYTECHNICS ELECTRICAL DEPARTMENT


BDE CHAPTER-1 SUBJECT CODE: 4320703

 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 −

Step Binary Number Hexadecimal Number

Step 1 101012 0001 0101

Step 2 101012 110 510

Step 3 101012 1516

Binary Number − 101012 = Hexadecimal Number − 1516

Shortcut method - Hexadecimal to Binary

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 −

Step Hexadecimal Number Binary Number

Step 1 1516 110 510

Step 2 1516 00012 01012

Step 3 1516 000101012

Hexadecimal Number − 1516 = Binary Number − 101012

ARITHMETIC OPERATIONS WITH BINARY NUMBER:


Binary arithmetic includes the basic arithmetic operations of addition, subtraction, multiplication
and division. The following sections present the rules that apply to these operations when they
are performed on binary numbers. When we add 1 + 1. + 1 (carry) produces 11, recorded as 1
with a carry to the next column

V.P.M.P POLYTECHNICS ELECTRICAL DEPARTMENT


BDE CHAPTER-1 SUBJECT CODE: 4320703

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

V.P.M.P POLYTECHNICS ELECTRICAL DEPARTMENT


BDE CHAPTER-1 SUBJECT CODE: 4320703

Binary multiplication is similar to decimal multiplication. It is simpler than decimal multiplication


because only 0s and 1s are involved. There are four rules of 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 and 2’s complements of binary numbers:

V.P.M.P POLYTECHNICS ELECTRICAL DEPARTMENT


BDE CHAPTER-1 SUBJECT CODE: 4320703

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"

9s and 10s complements number:


Simply, by adding 1 to its 9's complement we can get its 10's complement value. For example,
suppose we have a number 1423, and we want to find the 10's complement of the number. For this,
we find the 9's complement of the number 1423 that is 9999-1423= 8576, and now we will add 1
to the result.

R-1’s and R’s complements:


The r's complement is also known as Radix complement (r-1)'s complement, is known as
Diminished Radix complement. If the base of the number is 2, then we can find 1's and 2's
complement of the number. Similarly, if the number is the octal number, then we can find 7's and
8's complement of the number.

V.P.M.P POLYTECHNICS ELECTRICAL DEPARTMENT


BDE CHAPTER-1 SUBJECT CODE: 4320703

V.P.M.P POLYTECHNICS ELECTRICAL DEPARTMENT

You might also like