0% found this document useful (0 votes)
253 views23 pages

Number System Conversation (Fully Explained With Questions) .

This document introduces different number systems including binary, decimal, octal, and hexadecimal. It discusses: - The bases and place values of each system, with binary using base-2, decimal using base-10, octal using base-8, and hexadecimal using base-16. - How numbers are represented by summing place value times digit in each system, such as a decimal number equaling ones place + tens place × 10 + hundreds place × 100, etc. - Tables showing the place values, digits, and binary/decimal equivalents for octal and hexadecimal systems. - Examples of expressing decimal numbers in expanded notation using place values, such as 625.536 = 600 +

Uploaded by

PiYuSH SharMa
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)
253 views23 pages

Number System Conversation (Fully Explained With Questions) .

This document introduces different number systems including binary, decimal, octal, and hexadecimal. It discusses: - The bases and place values of each system, with binary using base-2, decimal using base-10, octal using base-8, and hexadecimal using base-16. - How numbers are represented by summing place value times digit in each system, such as a decimal number equaling ones place + tens place × 10 + hundreds place × 100, etc. - Tables showing the place values, digits, and binary/decimal equivalents for octal and hexadecimal systems. - Examples of expressing decimal numbers in expanded notation using place values, such as 625.536 = 600 +

Uploaded by

PiYuSH SharMa
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/ 23

N u m b e r S y ste m s

Introduction

A digital computer manipulates discrete elements of data and that these


elements are represented in the binary forms. Operands used for
calculations can be expressed in the binary number system. Other
discrete elements including the decimal digits, are represented in binary
codes. Data processing is carried out by means of binary logic elements
using binary signals. Quantities are stored in binary storage elements.
The purpose of this unit is to introduce the various binary concepts as a
frame of reference for further study in the succeeding units

Lesson 1 : Number Systems


1.1 Learning Objective

On completion of this lesson you will be able to :

• describe different number systems


• identify decimal, binary and other numbers
• explain different number systems with examples.

1.2 Number Systems

n u m b e r sy ste m sim ila r to th e d e c im a l sy ste m ( b =


system (b=2). Such a system uses b symbols for the integers

0, 1, 2, 3, ..., b-1

These symbols are called the digits of the system.

Any integer N is represented in the system by a sequence of base-b digits


Number Systems
:

N = an an-1... a1 a0

Then bk is the place value of ak, and

N = an × bn + an-1×bn-1 + ... + a2 × b2 + a1 × b1 + a0 × b0

17
Computer Basics

1.3 Decimal System

Any positive integer N, represented in the decimal system as a string of


decimal digits, may also be expressed as a sum of powers of 10, with
each power weighted by a digit. For example, N = 8253 can be
expressed as follows :

8253 = 8×103 +2 ×102 +5 ×101 +3×100


= 8×1000+2×100+5×10+3×1
= 8000 + 200 + 50 +3

Decimal System
The powers of ten,

100 = 1 101 = 10 102 = 100 103 = 1000 ...

which correspond respectively to the digits in a decimal integer as read


from right to left, are called the place values of the digits.

Any fractional value M, represented in the decimal system by a string of


decimal digits together with an embedded decimal point, may also be
expressed in expanded notation by using negative powers of 10.
Specifically, the place values of the digits in M to the decimal point are
respectively

10-1 = 0.1 10-2 = 0. 01 10-3 = 0. 001 ...

For example, M = 837.526 is expressed in expanded notation as follows:

837.526 = 8×102 +3×101+7×100 +5×10-1 +2×10-2 +6×10-3


= 800+30+7 + 0.5 + 0.0 2 + 0. 006

This decimal fraction is said to have three decimal places, the number of
digits to the right of the decimal point.

The arithmetic of decimal fractions is not very complicated; one has to


keep track of the decimal points.

1.4 Binary System


Any binary number is therefore a sequence of bits, possibly with an
embedded binary point. Those numbers that have no fractional part, i.e.,
Binary System are without an embedded binary point, are called binary integers.

The place values in the binary system are the powers of the base b=2,
just as the place values in the decimal systems are the powers of ten.

18
N u m b e r S y ste m s

Specifically, the place values of the integral part of a binary number are
the nonnegative powers of two.

20 21 22 23 ...

and the place values of the fractional part of a binary number are the
negative powers of two,

2-1 2-2 2-3 ...

Table 1.1.

Binary place values Decimal values

2-4 0.0625
2-3 0.125
2-2 0.25
2-1 0.5
20 1
21 2
22 4
23 8

1.5 Octal System

Since 8 = 23, each octal digit has a unique 3-bit binary representation,
given in Table 1.2.

Table 1.2

Octal digit Decimal values Binary equivalent


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

19
Computer Basics

The place values in the octal system are powers of 8; some of the these
powers appear in Table 1.3.

Table 1.3

Octal Place Values Decimal Values

8-3 1/512 = 0.001953125


8-2 1/64 = 0.015625
8-1 1/8 = 0.125
80 1
81 8
82 64
83 512
84 4096
85 32768

1.6 Hexadecimal System

Since 16 =24, each hexadecimal digit has a unique 4-bit representation


which is shown in Table 1.4. The place values in the hexadecimal
Hexadecimal System system are the powers of 16, some of which are listed, along with their
decimal values, in Table 1.5.

Table 1.4 Table 1.5

Hexadecimal Decimal Birnary Hexadecimal


Digits Values Equivalents Place Values Decimal Values

0 0 0000 16-3 1/4096 =


1 1 0001 0.000244140625
2 2 0010 16-2 1/256 = 0.00390625
3 3 0011 16-1 1/16 = 0.0625
4 4 0100 160 1
5 5 0101 161 16
6 6 0110 162 256
7 7 0111 163 4096
8 8 1000 164 65536
9 9 1001 165 1048576
A 10 1010
B 11 1011
C 12 1100
D 13 1101
E 14 1110
F 15 1111

20
N u m b e r S y ste m s

1. 7 Exercise

1. Multiple choice questions

a. The place values in the decimal systems are the powers of

i) 2
ii) 8
iii) 10
iv) 16.

b. The place values of the fractional part of a binary number are the

i) nonnegative powers of 2
ii) negative powers of 2
iii) negative powers of 10
iv) negative powers of 8.

c. Each hexadecimal digit has a unique

i) 2-bit binary representation


ii) 3-bit binary representation
iii) 4-bit binary representation
iv) 5-bit binary representation.

2. Analytical questions

i) How 625.536, 0.326, 735, 1278 can be expressed in expanded


notation in respect of decimal system?
ii) Identify the number of digit needed to express decimal, binary,
octal & hexadecimal system.

3. Questions for short answers

i) What are the bases of binary, decimal, octal and hexadecimal


numbers?
ii) Give binary values for hexadecimal number AF3.

21
Computer Basics

Lesson 2 : Conversion of Numbers


2.1 Learning Objective

On completion of this lesson you will be able to :

• identify the differences between different number systems


• convert binary to decimal
• convert decimal to binary
• interconvert hexadecimal-decimal
• interconvert hexadecimal-binary.

2.2 Binary-to-Decimal Conversion

Any binary number can be written in expanded notation as the sum of


each digit times that digit's place value. For example,

110101 = 1 × 25 + 1 × 24 + 0 × 23 + 1 × 22 + 0 × 21 + 1 × 20

101.110 = 1 × 22 + 0 × 21 + 1 × 20 + 1 × 2-1 + 1 × 2-2 + 0 × 2-3

Since each power of two is weighted by either 0 or 1, the binary number


is simply the sum of those place values in which the bit 1 appears. This
sum at once gives us the decimal equivalent of the binary number.

Table 1.6 lists the binary representations of the integers from 0 to 25,
with the place of the bits shown at the top of the table. Sometimes a
subscript 2 is used to distinguish a binary number, e.g. one may write
1010112 if it is not clear from the context that 101011 is a binary number
rather than a decimal number. Also, for easier reading, one sometimes
separates a binary number into 4-bit groups, to the left and right of the
binary point; e.g.

10110100.011010 might be written 1011 0100.0110 10

22
N u m b e r S y ste m s

Table 1.6

Decimal Binary Number


Number 16s 8s 4s 2s 1s
0 0
1 1
2 1 0
3 1 1
4 1 0 0
5 1 0 1
6 1 1 0
7 1 1 1
8 1 0 0 0
9 1 0 0 1
10 1 0 1 0
11 1 0 1 1
12 1 1 0 0
13 1 1 0 1
14 1 1 1 0
15 1 1 1 1
16 1 0 0 0 0
17 1 0 0 0 1
18 1 0 0 1 0
19 1 0 0 1 1
20 1 0 1 0 0
21 1 0 1 0 1
22 1 0 1 1 0
23 1 0 1 1 1
24 1 1 0 0 0
25 1 1 0 0 1

Example 2.1:

(a) To convert 1101012 to its decimal equivalent, write the appropriate


place value over each bit and then add up those powers of two which
are weighted by 1 :

Place values 25 24 23 22 21 20
Binary number 1 1 0 1 0 1
1
4
16

32
Decimal equivalent 53

23
Computer Basics

(b) To convert 101.11012 to its decimal equivalent, use Table 1.1 for
the decimal values of the negative powers of two

Place values 22 21 20 2-1 2-2 2-3 2-4


Binary number 1 0 1 1 1 0 1

0.0625
0.25
0.5
1
4
Decimal equivalent 58125
.
2.3 Decimal-to-Binary Conversion
It is possible to find binary representation of a decimal number N by
converting its integral part (NI), and its fractional part (NF) separately. It
is illustrated with the decimal number N = 109.78125.

Example 2.2

(a) To convert NI = 109 to binary equivalent, divide NI and each


successive quotient by 2, noting the remainders, as follows :
Decimal-to-Binary Conversion Divisions Quotients Remainders
109 ÷ 2 54 1
54 ÷ 2 27 0
27 ÷ 2 13 1
13 ÷ 2 6 1
6÷2 3 0
3÷2 1 1
1÷2 0 1

The zero quotient indicates the end of the calculations. The sequence of
remainders from the bottom to up, as indicated by the arrow, yields the
required binary equivalent. That is NI = 109 = 11011012.

In practice, the above divisions may be condensed as follows :


Remainders
2)109
2)54 1
2)27 0
2)13 1
2)6 1
2)3 0
1 1

24
N u m b e r S y ste m s

Here stop when the quotient, 1, is less than the divisor 2, since this last
quotient will be next and last remainder. Again the arrow indicates the
sequence of bits that gives the binary equivalent of the number.

(b) To convert NF = 0.78125 to its binary equivalent, multiply NF and


each successive fractional part by 2, noting the integral part of the
product, as follows :

Multiplications Integral parts


0.78125 × 2 = 1.56250 1
0.5625 × 2 = 1.1250 1
0.125 × 2 = 0.250 0
0.25 × 2 = 0.50 0
0. 50 × 2 = 1.00 1

The zero fractional part indicates the end of the calculations. It is


observed that the integral part of any product can only be 0 or 1, since it
is required to double number which is less than one. The sequence of
integral-part digits from the top to down, as indicated by the arrow,
yields the required binary equivalent. That is, NF = 0.78125 = 0.110012.

In practice, the above multiplications may be condensed as follows :

0.781 25
×2
1.562 50
×2
1.125 00
×2
0.250 00
×2
0.500 00
×2
1.000 00

It is observed that the integral part of each product is underlined and


does not figure in the next multiplication. Again the arrow indicates the
sequence of integral or integral-part digits that give the required binary
representation.

It is found that the binary equivalents of the integral and fractional parts
of the decimal number N = 109.78125. The binary equivalent of N is
simply the sum of these two equivalents:

N = NI + NF = 1101101.11001

25
Computer Basics

Example 2.3 :

Let, N = 13.6875. Convert the integral part, NI = 13, and the fractional
part, NF = 0.6875, into binary forms :

Remainders Integral parts

2)13 0.6875
2)6 1 ×2
2)3 0 1.3750
1 1 ×2
0.7500
×2
1.5000
×2
1.0000

Thus, N = 13.6875 = 1101.10112.

Remark: The binary equivalent of a terminating decimal fraction does


not always terminate. For example, convert N = 0.6 as above:

Multiplications Integral parts


0.6 × 2 = 1.2 1
0.2 × 2 = 0.4 0
0.4 × 2 = 0.8 0
0.8 × 2 = 1.6 1

At this point in the procedure, one can again multiply 0.6 by 2. This
means the above four steps will be repeated again and again. That is,

N = 0.6 = 0.1001 1001 1001 ...2

(The number of bits which repeat is not always four; nor does the
repeating block necessarily begin at the binary point, it depends on the
given N.)

2.4 Hexadecimal-Decimal Interconversion

Conversion between the hexadecimal and decimal systems is


Hexadecimal-Decimal Inter- accomplished via the algorithms of Section 2.3 with b = 16. There is an
conversion added difficulty in that one has to know how to handle the hexadecimal
digits A, B, C, D, E and F. One can also convert from hexadecimal to
decimal by decimal evaluation of the expanded hexadecimal form.

26
N u m b e r S y ste m s

Example 2.4 :

(a) To convert 73D516 to its decimal equivalent, express the number in


expanded notation, change D to 13, and then calculate using
decimal arithmetic.

73D516 = 7×163 +3×162 +13×161 +5×160


= 7×4096+3×256+13×16 + 5×1
= 28672 + 768 + 208 +5 = 29653

Alternatively, one can apply the conversion algorithm as follows :

7
×16
112
+3
115
×16
1840
+13
1853
×16
29648
+5
29653 = 73D516

(b) Convert 39.B816 to its decimal equivalent as follows :

39.B816 = 3 × 161 + 9 × 160 + 11 × 16-1 + 8 × 16-2


= 3 × 16 + 9 × 1 + 11 × 0.0625 + 8 × 0.00390625
= 48 + 9 + 0.6875 + 0.03125 = 57.71875

(c) To convert the decimal number P = 9719 to its hexadecimal


equivalent, divide P, and each successive quotient by the base b =
16, noting the remainders, as follows :

Divisions Quotients Remainders


9719 ÷ 16 607 7
607 ÷ 16 37 15
37 ÷ 16 2 5
2 ÷ 16 0 2

The sequence of remainders, which replaces the decimal remainder 15


by the hexadecimal digits F, in reverse order, gives the hexadecimal
form for P; i.e. P = 25F716.

27
Computer Basics

(d) To convert the decimal fraction Q = 0.78125 to its hexadecimal


equivalent, apply the integral-part algorithm, with b = 16, as
follows :

Multiplications Integral parts

0.78125 × 16 = 12.50000 12
0.50000 × 16 = 8.00000 8

In this case a zero fractional part is reached. The sequence of integral


parts, which replace the decimal 12 by the hexadecimal digit C, gives the
required hexadecimal form for Q = 0.C816.

(e) To convert the decimal number N= 9719.78125 to its hexadecimal


form, add the representations found in (c) and (d) :

N = P + Q = 25F7.C816

Hexadecimal-Binary Interconversion

This is accomplished exactly as octal-binary interconversion, except that


4-bit equivalents are now involved.

Example 2.5 :
Hexadecimal-Binary Inter-
conversion
Convert to binary form (a) 3D5916, (b) 27.A3C16.

Replace each hexadecimal digit by its 4-bit representation (Table 1.4)

(a) 3D59

0011 1101 0101 1001

Hence, 3D5916 = 111101010110012.

(b) 27.A3C

0010 0111 . 1010 0011 1100

Hence, 27.A3C16 = 10011110100011112.

28
N u m b e r S y ste m s

Example 2.6 :

Convert to hexadecimal form (a) 101101001011102, (b)


11100.10110110112.

Partition each binary number into 4-bit blocks to the left and right of the
binary point adding 0s if necessary. Then replace each 4-bit block by its
equivalent hexadecimal digit (Table 1.4).

(a) 0010 1101 0010 1110

2D2E

Hence, 2D2E16 is the required hexadecimal form.

(b) 0001 1100. 1011 0110 1100

1 C. B 6 C

Hence, 1C.B6C16 is the required hexadecimal form.

2.5 Exercise

1. Multiple choice questions

a. The decimal equivalent of 11102 is

i) 8
ii) 10
iii) 12
iv) 14.

b. The decimal equivalent of 101102 is

i) 15
ii) 18
iii) 22
iv) 24.

29
Computer Basics

c. The binary equivalent of 109 is

i) 1001102
ii) 11110012
iii) 11011012
iv) 11101012.

d. The decimal equivalent of 25 F716 is

i) 1719
ii) 9610
iii) 9719
iv) 09919.

2. Analytical questions

a. Convert the following binary numbers to decimal equivalent.

i) 101012
ii) 1001012
iii) 1011.1012
iv) 101.11012.

b. Convert the following decimal numbers to binary

i) 653.625
ii) 13.6875
iii) 367
iv) 235.07.

c. Convert the following hexadecimal numbers to decimal

i) 129A.B8616
ii) 73D516
iii) 0.782516
iv) 39.C816.

d. Convert the following hexadecimal numbers to binary

i) 129A.B8616
ii) 3D5916.

e. Convert the following binary numbers to hexadecimal

i) 101101001011102
ii) 101101101110.10001102.

30
N u m b e r S y ste m s

Lesson 3: Binary Arithmetic


3.1 Learning Objective

On completion of this lesson you will be able to :

• add two binary numbers


• multiply two or more binary numbers
• subtract one binary number from another
• do division of binary numbers.

3.2 Binary Addition

The execution of numerical calculations is essentially the same in all


positional number systems. The addition of two binary numbers is
accomplished according to the following three-step algorithm :

Step 1. Add the first (rightmost) column.

Binary Addition Step 2. Record the unit digit of the column sum. If the sum exceeds
one, carry the two's digit 1, to the next column.

Step 3. If there are additional columns or if there is a carry from Step


2, add the next column and repeat Step 2. Otherwise stop.

The addition table for the binary digits 0 and 1 appears as Table 1.7 the
only additional facts needed for binary addition appear in Table 1.8.

+ 0 1 0+0=0
0 0 1 0+1=1
1 1 10 1+0=1
1 + 1 = 0, with a carry of 1
1 + 1 + 1 = 1, with a carry of 1
Table 1.7 Binary Addition
Table 1.8 Binary Addition Facts

Example 3.1 :

Evaluate the binary sum


111 Addend
+101 Augend

by means of the three-step algorithm.

31
Computer Basics

STEP 1: 1 + 1 = 0, with a carry of 1.


STEP 2:
1 Carries
111 Addend
+ 101 Augend
0
STEP 3: 1+1 = 0, with a carry of 1.
STEP 2.
11 Carries
111 Addend
+101 Augend
00
STEP 3: 1 + 1 + 1 = 1, with a carry of 1.
STEP 2.
111 Carries
111 Addend
+101 Augend
100

STEP 3: 1 + 0 =1.
STEP 2.
111 Carries
111 Addend
+101 Augend
1100 Sum

Step 3. Stop.

Example 3.4 :

To calculate the binary product 1101011 × 10110 multiply 1101011 by


the digits 0, 1, 1, 0 and 1 as follows :

1101011
× 10110
0000000
1101011
1101011
0000000
1101011

Then add the five bottom rows of numbers. In actual practice, one does
not write down any zero products. Finally bring down initial zero, if any
and form a running total, adding one nonzero row after another :

32
N u m b e r S y ste m s

1101011 Initial zero


× 10110
11010110 First nonzero product
1101011 Second nonzero product
1010000010 Sum
1101011 Third nonzero product
100100110010 Final sum

The final sum is the required product. Here it is extremely important to


line up the numbers in the correct columns.

3.3 Binary Subtraction


Subtraction in the binary system can be performed using the following
two-step algorithm:

Binary Subtraction Step 1. If the lower (subtrahend) digit is greater than the upper
(minuend) digit, borrow from the next column to the left.

Step 2. Subtract the lower value from the upper value.

In Step 1 ''borrowing" means appropriating, with no intention of paying


back.

The only subtraction facts needed for binary subtraction are the four
listed in Table 1.9.

The last entry comes from :

10 - 1 = 1

That is, the difference 0 - 1 requires borrowing, which then yields 10 -1


= 1.
Table 1.9 Binary subtraction facts
0-0=0
1-0=1
1-1=0
0 - 1 = 1, with a borrow of 1 from the next column

Example 3.5 :

To evaluate the binary difference 11101-1011, one could apply the


subtraction facts in Table 1.5 and obtain.

11101
- 1011
10010

33
Computer Basics

It is observed that 1 is borrowed from the third column because of the


difference 0-1 in the second column.

As with decimal subtraction, binary subtraction becomes more complex


when a borrow is needed from a digit which is 0. Again, a borrow is
taken from the first nonzero digit to the left, but now each intervening 0
becomes 1 (as 10-1=1).

Example 3.6 :

Consider the difference


11000
-10011

Obtain,
011
11000
- 10011
101

Here a difference 0 - 1 occurs in the first column; hence it is required to


borrow from the fourth column, where the first nonzero digit to the left
appears, and the two intervening 0s become 1s.

Example 3.7 :

Calculate the difference 1100101001-110110110.

00110 01
1100101001
- 110110110
101110011

3.4 Binary Division

Recall that the division of decimal numbers can be reduced to


Binary Division multiplying the divisor by individual digits of the dividend and
subtraction.

Example 3.8 :

Calculate 42558 ÷ 123. Here 123 is the divisor. The algorithm for
division yields :

34
N u m b e r S y ste m s

346
123)42558
369
565
492
738
738
0

That is, multiply 123 by 3 and subtract the product, from 425; then
multiply 123 by 4 and subtract the product 492, from 565; lastly multiply
123 by 6 and subtract the product 738, from 738, to obtain a 0
remainder. [Because of the geometry of the scheme, what these steps
actually accomplish is first to subtract 3 × 102 times the divisor from the
dividend, then 4 × 10 times the divisor from what is left, and then 6
times the divisor from what is left. At that point the dividend is
exhausted, showing that the dividend originally contained the divisor
3 ×102 + 4 × 10 + 6 =346 times].

The above algorithm also works for binary division. In fact, multiplying
the divisor by the only nonzero digit, 1, does not change the number;
hence the algorithm for division reduces to repeated subtraction of the
divisor (times a power of 2).

Example 3.9 :

Evaluate 1010001 ÷ 11. This gives

11011
11)1010001
11
100
11
100
11
11
11
0
Thus the quotient is 11011.

As in decimal division of integers, a remainder is possible when one


binary is divided by another. Also, the division of binary fractions is
handled the same way as the division of decimal fractions; that is, one
converts the divisor to an integer by moving the binary point in both the
divisor and the dividend the same the number of places.

35
Computer Basics

Example 3.10 :

Evaluate 1110111 ÷ 1001. Applying the usual division algorithm,

1101
1001)1110111
1001
1011
1001
1011
1001
10

The quotient is 1101, with a remainder 10.

3.5 Complements

Arithmetic complements require in two separate but related situations.


First of all, complements come up in storing numbers in the computer.
While human-beings use the signs + and - to denote positive and
Complements
negative numbers, the computer can process data only in terms of bits.
Although it is possible to reserve a bit to denote the sign of a number
(say, 0 for + and 1 for -), many computers store negative numbers in the
form of their arithmetic complements.

Complements also arise in the operation of subtraction. In fact,


complements can be used to reduce subtraction to addition. This is
especially useful as it avoids the possibility of repeated borrowing from
one column to another.

There are two types of complements, the one's complement and two's
complement, respectively.

A is a binary number, the one's complement of A is obtained by


subtracting each digit of A from 1, and the two's complement of A is its
one's complement plus 1.

Example 3.11 :

Binary number: 111100001111


One's complement: 000011110000
Two's complement: 000011110001

36
N u m b e r S y ste m s

Observe that taking the ones complement simply inverts each digit, i.e. 0
is replaced by 1 and 1 is replaced by 0.

As in the decimal system, binary subtraction is performed by adding the


radix-minus-one (one's) complement plus one or by adding the radix
(two's) complement.

Example 3.12 :

Evaluate the difference Y = B - A, where A = 10001110 and B =


11110000.

(a) First by ordinary binary subtraction :

011
11110000 B
-10001110 A
01100010 Y

Observe that the borrowing was propagated to the third digit to the left.

(b) The one's complement of A is 01110001. Add this to B and then


add 1:

11110000 B
+ 01110001 One's complement of A
01100001
1
01100010

(This method is also given the name end-around carry).

(c) The two's complement of A is 01110010. Add this to B:

11110000 B
+01110010 Two's complement of A
01100010
Deleting the 1 (which would be an overflow in an 8-bit register) gives
the difference Y.

37
Computer Basics

3.6 Exercise

1. Multiple choice questions

a. Addition in the binary system can be performed using

i) 2 step algorithm
ii) 3 step algorithm
iii) 4 step algorithm
iv) 5 step algorithm.

b. Complement arise in the operation of

i) addition
ii) subtraction
iii) multiplication
iv) conversion.

2. Analytical questions

a. Describe the three step algorithm with example.

b. Describe the 2-step algorithm.

c. Add the following binary numbers

i) 101102 and 11002


ii)1001012 and 101002.

d. Multiply the following numbers

i) 1000112 and 1012


ii)1012 and 10112.

e. Evaluate the following

i) 10010 - 11011
ii) 10101 - 00110
iii)11101 - 1011.

f. Evaluate the following

i) 11010011 ÷ 11
ii) 11110111 ÷ 1001.

38
N u m b e r S y ste m s

g. What do you understand by 1's complement and 2's complement


method?

h. Find the 1's complement and 2's complement of the following


numbers

i) 1011012
ii) 1111000011112
iii) 909010
iv) 10101012.

i. Perform following subtraction using 1's and 2's complement


method

i)11011 - 10010
ii)10001110 - 11110000
iii) 10101 - 00110.

39

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy