Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
72 views18 pages

COG Chapter 1

Download as doc, pdf, or txt
Download as doc, pdf, or txt
Download as doc, pdf, or txt
You are on page 1/ 18

Number System

Radix Conversions
Conversion of Decimal System to other Systems
Character Codes (Alphanumeric Representation)

Unit 1
Representation of Information

Learning Objectives
After reading this unit you should appreciate the following:
 Number System
 Floating Point Representation
 Integer Representation
 Character Codes
Top

Number System
Number system is a set of symbols to form numbers. Numbers are expressed by a string of digit symbols.
To determine the quantity that a number represents is determined by multiplying each digit by a power of
base called radix represented by ‘r’ and then forming the sum of all digits. For example, 410 may be
represented in decimal number as
4  100+110+ 01
= 400 + 10
= 410
This number system utilizes the base 10 (the 10 symbols are 0,1,2,3 to 9). Various other numbers systems
use different base. For example the binary number system uses the base 2, the octal 8 i.e. 0- 7 and
hexadecimal 16 i.e. 0-9 and A-F. The sum of the weighted digits is formed for the conversion of a number
in base ‘r’ into the familiar decimal system. Conversion of a decimal integer into a base ‘r’ representation is
performed by, successive divisions by ‘r’ and accumulation of the remainders. The conversion of a decimal
fraction to base ‘r’ representation is accomplished by successive multiplication’s by ‘r’ and accumulation of
the integer digits so obtained. This is shown below.
The binary representation of decimal numbers up to 15 is
2 ARTIFICIAL INTELLIGENCE

Decimal Binary Octal Hexadecimal


(base 10) (base 2) (base 8) (base 16)
0 0000 0 0
1 0001 1 1
2 0010 2 2
3 0011 3 3
4 0100 4 4
5 0101 5 5

6 0110 6 6
7 0111 7 7
8 1000 10 8
9 1001 11 9
10 1010 12 A
11 1011 13 B
12 1100 14 C
13 1101 15 D
14 1110 16 E
15 1111 17 F
35 10 0011 43 23
100 110 0100 144 64
255 1111 1111 377 FF

Therefore if in hexadecimal we want to portray 27 then it will be like this


27 = 1x16 + 11 x 1 where 1 is 1 and 11 is C therefore 27 is 1B
Top

Radix Conversions
A number in any radix (base) is very much convertible into any other radix. A binary number system has
radix-2 consisting of only two digits, decimal system has a radix-10 consisting of digits from 0-9 and octal
system has a radix-8 consisting of digits from 0-7. Similarly a hexadecimal system has radix-16 consisting
of digits from 0-9 and from A to F.
Top

Conversion of Decimal System to other Systems


Decimal to Binary
Integer Conversion

The following method is employed to convert decimal system into other systems:
WHAT IS ARTIFICIAL INTELLIGENCE 3

Remainder Method: This method includes the following steps:


1. Divide the given number of decimal system by the radix R of the proposed system
and get a quotient Q1 and a remainder R1.
2. Divide the quotient Q1 by the radix R again to get quotient Q2 and a remainder R2.
3. Divide the quotient Q2 by the radix R again to get quotient Q3 and a remainder R3.
In this process the successive quotients are divided by the radix R of the proposed system
repeatedly until the quotients become less than the radix R. Thus, the required number can be
obtained by writing the last quotients first and then remainders in the reverse order, i.e.,
Qn Rn Rn-1 Rn-2 ..... R2 R1

Example 1.1

Convert decimal 31 to binary. This can be done as follows:


Integer number=31
31 divide by 2 remainder 1 (Quotient 15)
15 divide by 2 remainder 1 (Quotient 7)
7 divide by 2 remainder 1 (Quotient 3)
3 divide by 2 remainder 1 (Quotient 1)
1 divide by 2 remainder 1 (Quotient 0)
hence by writing these remainders in reverse order we get binary equivalent of 31
(31) 10 = (011111) 2
or (31)10 = (11111)2

Fraction Conversion
This method is employed to convert the fraction part of the decimal system to other systems.
1. Multiply fraction to be converted of proposed system with radix. Let the fraction part of this
product be F1 and I1 resulting integer.
2. Multiply the resulting fraction part F1 with the radix again, we’ll get F2 and I2.
3. Repeat the above steps until the fraction part disappears.
4. The required fraction number in the required system with radix R would be I 1 I2 I3 ...... In

Example 1.2

Convert the decimal number 41.125 into binary. Here we first convert the integer part 41 into binary
by using remainder method. It is shown as follows:
41 divide by 2 remainder 1 (Quotient 20)
20 divide by 2 remainder 0 (Quotient 10)
4 ARTIFICIAL INTELLIGENCE

10 divide by 2 remainder 0 (Quotient 5)


5 divide by 2 remainder 1 (Quotient 2)
2 divide by 2 remainder 0 (Quotient 1)
1 divide by 2 remainder 1 (Quotient 0)
Now fraction part 0.125 can be converted as follows:
0.125
Fraction 2
0.250
Integer part=0
0.250
Fraction 2
0.500
Integer part=0
0.500
Fraction 2
1.000
Integer part=1
Fraction 0.000.
Hence binary equivalent of .125 is 001. Therefore, the binary equivalent of (41.125) 10 is
(101001.001)2
First of all the number is split into two parts i.e. integer part (41) and fraction part (125). The integer part is
converted by dividing 41 by r = 2 to give an integer quotient of 20 and a reminder of 1. The quotient is
again divided by 2 to give a new quotient and remainder. This process of successive division is repeated
until the integer quotient becomes 0, the first remainder giving the low order bit of the converted binary
number.

Example 1.3

Find the binary equivalent of (36)10. Here integer number=36


36 divide by 2 remainder 0 (Quotient 18)
18 divide by 2 remainder 0 (Quotient 9)
9 divide by 2 remainder 1 (Quotient 4)
4 divide by 2 remainder 0 (Quotient 2)
2 divide by 2 remainder 0 (Quotient 1)
1 divide by 2 remainder 1 (Quotient 0)
Hence (36)10 = (100100)2

Example 1.4

Find the binary equivalent of (23.8125) 10. First we find the binary equivalent of integer part 23 as
follows:
WHAT IS ARTIFICIAL INTELLIGENCE 5

23divide by 2 remainder 1 (Quotient 11)


11divide by 2 remainder 1 (Quotient 5)
5 divide by 2 remainder 1 (Quotient 2)
2 divide by 2 remainder 0 (Quotient 1)
1 divide by 2 remainder 1 (Quotient 0)
hence (23)10 = (10111)2
How we find binary equivalent of 0.8125
0.8125
Fraction 2 Integer part = 1
1.6250
0.6250
Fraction  2 Integer part=1
0.12500
0.2500
Fraction  2 Integer part=0
0.5000
0.5000
Fraction  2 Integer part=1
1.0000

Hence (0.8125)10 = (0.1101)2


Therefore (23.8125)10 = (10111.1101)2
Hence (41)10 = (101001)2
Conversion of the fraction part is done by multiplying it by r = 2 to give an integer and a fraction. The new
fraction (without the integer) is multiplied again by 2 to give a new integer and a new fraction. This process
of successive multiplication is repeated until the fraction part becomes zero or until the number of digits
obtained gives the required accuracy, the first integer computed being the digit to be placed next to the
binary point. So the total required conversion is achieved by combining the two parts. In digital computers
these conversions from binary to binary, octal and hexadecimal representation are of great significance.
Since 23 = 8 and 24 = 16. Each octal digit corresponds to three binary digits and each hexadecimal digit
corresponds to four binary digits. A binary number is split into the group of three bits each for converting
into octal number. The corresponding octal digit is then assigned to each group of bits and the string of
digits so obtained gives the octal equivalent of the binary number.
Since a binary number consists of a string of 1s and 0s, the 16-bit register can be used to store any binary
number from 0 to 216-1. Conversion from binary to hexadecimal is similar except that the bits are divided
into groups of four.

Decimal to Octal Conversion


Dividing the given number repeatedly by 8 until it becomes 0 can do this conversion from decimal system
to octal. The example given below explains it:
6 ARTIFICIAL INTELLIGENCE

Example 1.5

Convert decimal number 12110 into octal. This process is shown as follows:
divide 12110 by 8 remainder 6 (Quotient 1513)
divide 1513 by 8 remainder 1 (Quotient 189)
divide 189 by 8 remainder 5 (Quotient 23)
divide 23 by 8 remainder 7 (Quotient 2)
divide 2 by 8 remainder 2 (Quotient 0)
hence (12110)10 = (27516)8

Decimal to Hexadecimal Conversion


Conversion of a decimal into a hexadecimal is similar to that of converting a decimal into its binary
equivalent. The decimal part is divided by 16 until it becomes 0 for integer part conversion. The remainders
are than arranged in revise order similar the fraction part is converted by multiplying by 16 until the
fraction part reduces to 0. Than the integer part in these multiples are collected in the reverse order.

Example 1.6

Convert decimal number 755.9375 to its hexadecimal equivalent. The integer part 755 can be
converted as follows:
755 divide by 16 remainder 3 (Quotient 47)
47 divide by 16 remainder 15 (i.e.F) (Quotient 2)
2 divide by 16 remainder 2 (Quotient 0)
hence (755)10 = (2F3)16
Now we convert the fraction part .9375
0.9375
Fraction  16 Integer part=15 i.e. F
15.0000

Fraction 0.0000
Hence (0.9375)10 = (F)16
therefore (755.9375)10 = (2F3.F)16

Conversion from any Base to Decimal


Suppose the number in base 6
is anan-1 an-2…..a0.a-1a-2…..a-m
then its decimal equivalent is equal to
WHAT IS ARTIFICIAL INTELLIGENCE 7

bn  an+bn-1  an-1+……  b0  a0+b-1  a-1+……  b-m  a-m


here b is the base of the number, to be converted into decimal.

Binary to Decimal Conversion


Decimal equivalent of the binary number
an an-1an-2….a0.a-1 a-2…..a-m
can be obtained as
2n  an+2n-1+an-1+……+20 a0 +2-1  a-1+……2-m  a-m

Example 1.7

Convert the binary number (1010.011)2 into decimal. The decimal equivalent is
23  1+22  0+21  1+20  0+2-1  0+2-2  2-3  1=10.375

i.e.  1010.011  2   10.375 10

Octal to Decimal Conversion


If the Octal number is a n a n  1 ........a 0 . a 1 a  2 .......a m then its decimal equivalent is

8 n  a n  8 n 1  a n 1  ........8 0  a0  8 1  a 1 ........8  m  a  m

Example 1.8

Convert the number (550.4) 8 into decimal. The decimal equivalent for this number is
8 2  5  8 1  5  8 0  0  8 1  4
 320  40  0  0.5
 ( 360.5 )10

Hexadecimal to Decimal Conversion


The decimal equivalent of hexadecimal number
a n a n  1 .......a 0 a  1 a  2 .....a  m is

16 n  a n  16 n 1  a n 1  .....16 0  a 0  16 1  a 0  .....16  m  a  m

Example 1.9

Convert the Hexadecimal number 2F3.F2 into its equivalent decimal number. From the above
formula, we get
8 ARTIFICIAL INTELLIGENCE

 2F 3.F 2 16  16 2  2  F  16 1  3  16 .0  16 1  F  16 2  2
15 2
 512  15  16  3  
16 256
  755.9375  10

Binary to Octal Conversion


Since 23=8, each octal digits corresponds to three binary digits. Therefore the binary number is
partitioned into group of three digits each for its conversion into its octal equivalents. The corresponding
octal digit is then assigned to each group.

Example 1.10

Convert binary number 11011101.11010101 into octal.


11 011 101 110 101 01
3 3 5 6 5 1

hence  11011101 .1101010  2   335.651 8 .

Binary to Hexadecimal Conversion


Since 24=16 each hexadecimal digit corresponds to four binary digits. So the conversion is a accomplished
by partitioning the binary number into group of four digits. This can be understood by the following
example:

Example 1.11

Convert (11011101.11010101)2 into its hexadecimal equivalent


1101 1101 1101 0101
13 13 13 5
hence (11011101.11010101) 2= (DD.D5)16

Octal to Binary Conversion


This conversion is the reverse of the method described above, i.e. replace each octal digit by its
equivalent three bit, binary numbers.

Example 1.12

Convert octal number 552.47 into binary equivalent. On replacing each octal digit by its
corresponding three bits binary number, we get
(552.47)8 = (101 101 010.100 111) 2
WHAT IS ARTIFICIAL INTELLIGENCE 9

Hexadecimal to Binary Conversion


This method is again similar to the method described above i.e. each hexadecimal digit is converted to
its four digit binary equivalent. This is illustrated in the following example:

Example 1.13

Convert (305.F)16 into binary.


(305.F) 16 = (011 0000 0101.1111)

Complements
Complements are the operations employed for the simplification of the subtraction and logical
manipulation as well as for negative numbers representation. In a base-r system, two types of complements
are possible: (i) the r’s complement and (ii) (r-1)’s complement. For example for binary numbers there are
2’s and 1’s complements and decimal numbers have 10’s and 9’s complements.
i) The r’s Complement: The r’s complement of a positive number N is defined as r n-N. Where r is the
base of the number, N, and n is the number of digits in integer part of N.

Example 1.14

The 10’s complement of (5432)10=104-5432=4568


The 10’s complement of (432.67)10 = 104 – 432.67=567.33
The 2’s complement of (1101)2 = 24 – 1101= (10000-1101)= 0011
The 8’s complement of (243)8= 83-243=535
(ii) The (r-1)’s Complement:
The (r-1)’s complement of a positive number N is defined as
r n  r m  N

Where r is the base of number N, n is the no. of digits in integer part and m is the number of
digits in fraction part.
If there is no fraction part then the  r  1 1 , complement = r n  1 – N .

Example 1.15

The 9’s complement of  5432 10  10  1  5432  9999  5432  4567


4

The 9’s complement of ( 432.45 )10  10 4  10 2  432.45  999.99  432.45  567.54


10 ARTIFICIAL INTELLIGENCE

The 1’s complement of  1011 2  2 4  1  1011  1111  1011  0100

The 1’s complement of  111 .01 2  2  2  111 .01  111 .11  111 .01  000.10
3 2

From the above example it is clear that 9’s complement can be obtained by subtracting each digit
from 9. Similarly, 1’s complement of a binary number can be obtained by subtracting each digit from 1.

Subtraction using r’s Complement


In the usual method of subtraction when we subtract a number we may have to borrow from the other.
But this conventional method is not a success with digital computer. The 2’s complement method does
away with borrowing and hence is easy to evaluate subtraction this way. The 2’s complement method is
described as follows: (suppose we have to perform S-T).
1. Add the r’s complement of T to S.
2. If an end carry occurs (in the result of step 1), discard it, otherwise take the r’s complement of the
number obtained in step 1 and place a negative sign before it.

Example 1.16

Using 10’s complement subtract 5432 from 7345.


Here S = 7342 and T = 5432
10’s complement of 10 4  5432  4568

 7345
+ 4568
11913
discard the end carry
Hence S-T=1913

Example 1.17

Subtract 1234 from 0432 using 10’s complements


Here S = 0432
And, T=1234
10’s complement of T = 10 4  1234  8766

0432
+ 8766
9198
Since no end carry is here hence
S-T= (10’s complement of 9198)
WHAT IS ARTIFICIAL INTELLIGENCE 11

= – 0802

Subtraction using (r-1) ’s Complement


Method for subtraction of S-T in base r by using  r  1 ’s complement is as follows:

Add the (r-1)’s complement of T to S.


If an end carry occurs in the result of step 1, then add it the least significant digit. Otherwise take ( r-1)’s
complement of the result and place negative sign before it.

Example 1.18

Subtract 1234 from 0432 using 9’s complement


Here S= 0432 and T=1237
9’s complement of T= 10 4  1  1234  8765

0432
+ 8765
9197
Since no end carry to here, hence
S-T= - (9’s complement of 1997)
= – 0802

Example 1.19

Subtract 5432 from 7345 using 9’s complement.


Here S = 7345 and T = 5432
9’s complement of T = 104-1-5432 = 4567
7345
+ 4567
1 912
Since end carry is here, therefore:
1912
+1
S-T = 1913
1913

Student Activity 1.1


Before you proceed to the next section, answer the following questions.
12 ARTIFICIAL INTELLIGENCE

1. Convert the number (243.468)10 into its binary, octal and hexadecimal equivalent.
2. Convert the binary number (101101.101101)2 into octal and hexadecimal number system.
3. The roots of the quadratic equation x 2 – 12x  37  0 are 5 and 8. Find the base system in which
this equation is written.
4. Subtract 1101 from 0111 using (i) 2’s complement (ii) 1’s complement.
If your answers are correct, then proceed to the next section.
Top

Character Codes (Alphanumeric Representation)


A set of elements that comprises of the 10 decimal digits, the 26 letters of alphabet a number of a special
characters, such as $, @, and = etc. form a alphanumeric character set. The standard alphanumeric binary
code is the ASCII (American Standard Code for Information Interchange), which uses seven bits to code
128 characters. The decimal digits in ASCII can be converted to BCD (Binary Coded Decimal) by
removing the three high-orders bits, 011. Since registers can only hold binary information, the code must be
in binary form. Any set of discrete elements such as the musical notes and chess pieces and their positions
on the chessboard can be expressed in binary code given to the fact that these codes only change the symbol
not the meaning of the discrete elements the represents. These codes are also a used as a tools for the
formulation of instructions that specify control information for the computer. In ASCII scheme 65 represent
‘A’, 90 represent ‘Z’, 97 represent ’a’ and 122 represent ‘z’.
In digital computers at times the data to be processed may include not only numbers but letters also. For
example, a banking company with millions of customers may use a digital computer to process its files. In a
banking company, we may have to enter the customers name. To represent the customers name in the
binary form, it is necessary to have a binary code for the alphabet. So the need arises for a binary code that
can represent alphabets and some special characters in addition to decimal numbers.
An “alphabetic and numeric” (sometimes abbreviated alphanumeric) code is a binary code of a group of
elements inclusive of the 10 decimal digits, the 26 letters of the alphabet, and a certain number of special
symbols such as @. The total number of elements in an alphanumeric group can be greater than 36.
Therefore, it must be coded with a minimum of six bits (2 6 = 64, but 25 = 32 is insufficient).
For a better understanding of alphanumeric codes, one possible arrangement of a six-bit alphanumeric code
is shown in the table. We can show alphanumeric characters with few variations. The need to represent
more than 64 characters (the lowercase letters and special control characters for the transmission of digital
information) gave rise to seven and eight-bit alphanumeric codes. One such code is known as ASCII
(American Standard Code for Information Interchange); another is known as EBCDIC (Extended Binary
Coded Decimal Interchange Code). EBCDIC uses 8 bits of each character and a 9 th bit for parity. It has the
same character symbols of ASCII but the bit assignment to characters is different. We have shown ASCII
code in the table, which consists of seven bits but conventionally an eight-bit code is used wherein an
eighth bit is invariably added for parity. When discrete information is transferred through punch cards, the
alphanumeric characters use a 12-bit binary code. A punch card consists of 80 columns and 12 rows. In
each column, an alphanumeric character is represented by holes punched in the appropriate rows. A hole is
sensed as a 1 and the absence of a hole is sensed as a 0. The 12 rows are marked, starting from the top, as
the 12, 11, 0, 1, 2,..., 9 punches. The first three are called the zone punch and the last nine are called the
numeric punch. The 12-bit card code shown in Table 1-5 lists the rows where a hole is punched (giving the
1's). The remaining unlisted rows are assumed to be 0's. The 12-bit card code is inefficient with respect to
the number of bits used. Most computers translate the input code into an internal six-bit code. As an
example, the internal code representation of the name “John Doe” is:
WHAT IS ARTIFICIAL INTELLIGENCE 13

100001 100110 011000 100101 110000 010100 100110 010101


------ ------ ------ ------ ------ ------ ------ ------
J O H N blank D O E

Decimal Decimal Decimal Decimal

The first 32 characters and the last character are control characters. Usually, they are not displayed. However, some versions of C (some computers)
support special graphics characters for these ASCII values. For example, 001 may represent the character 002 may represent
and so on.

Fixed Point Representation


Real numbers are represented by two main formats i.e. fixed-point format and floating-point format.
Floating-point format allow a wide range of values but require expensive hardware or large software
implementation whereas fixed-point format require simple hardware but the range of values it allows is
very limited.
As shown in figure below is a fixed-point representation:
14 ARTIFICIAL INTELLIGENCE

16 bit
0 1 0 1 1 1 1 1 1 1 1 0 1 1 1 1

Sign bit Assumed binary point


The above notation represent the binary number + 01111111.101111.
If the above convention is used, then the maximum and minimum numbers in this notation are
Maximum number = 111111111.111111=  2 9  1   1  2 6 

= 511.984375
and Minimum number = 000000000.000001
= 2 6

= 0.015625
This range is quite inadequate even for simple arithmetic computations.

Floating Point Representation


The basic format of floating point numbers is m  b e . This format requires 3 digits: a mantissa m, an
exponent e and a base b.
In the above example the mantissa m is 2, exponent is 14 and the base of the number is 10.

Normalization
Floating-point representation has inherent demerits in the sense that the same number can be represented in
many ways. For example 3.0  1014 0.3  10 15 , 3000  10 11 and 0.03  10 16 , all represents the same
number. This necessitates a representation that is unique or normal for m and can be adopted by each
system. The mantissa is said to be normalized if the digits to the right of radix point is not zero, that is, no
lending zero appear in the magnitude part of the number. Hence, for above number 0.31015 is the normal
for m or we can say that 0.31015 is a normalized floating point number.

Electrical and Electronics Engineers (IEEE) Standard


Until 1980s, floating point formats differed from one digital computer to another. This problem has been
solved with the incorporation of the IEE 754 standard. This standard format is for 32-bit and larger floating
point numbers and was sponsored by Institute of Electrical and Electronics Engineers (IEEE). It is
employed for specifying the method for handling rounding the errors, overflow, underflow and other
conditions.
This standard has 23 bit mantissas (m), 8 bit exponent (e), and a sign bit 8. It is shown in the following
figure:

8 e m
WHAT IS ARTIFICIAL INTELLIGENCE 15

Sign 8 bit 23 bit mantissa


bit exponent (binary significant with
excess 127 hidden bit)
binary integer

In a normalized floating point number, the leftmost bit of significant (m) is always 1, so, its storage is
not required. The exponent is represented as 8-bit excess 127 code. Hence the actual mantissa is 1.m and
actual exponent is e-127. The base 10 of the number is 2. Hence the real number a in IEEE 1 st standard is
given by
a    1 s 2 e 127  1.m 

provided = 0<E<255
0<e<EST

Example 1.20

Represent the number a=-1.75 in IEEE 754 floating point format.


This number can be represented in 32-bit IEEE 754 floating point standard as follows
1 01111111 11000000000000000000000
where s= 1 for sign
e = 127 (8-bit excess 127 code)
and m = 0.75
Since
a=   1 1 2 127 127  1.75  1.75

The magnitudes for non-zero floating point numbers in the format ranges from 2 -126 (1.0) to 2+127 (2-2-
23
) that is, from 1.18  10-38 to 3.40  1038 approximately. On the contrary, the magnitudes for fixed point
binary formats for integers ranges from 1 to 2 31-1 i.e. 2.15  109 approximately. The
64-bit version of IEEE 754 standard is an extension to 32-bit. It employs an 11-bit exponent and
52-bit mantissas and the number it defines is
a= (-1)s 2e-1023 (1.m)
a=(-1) s 2e-1027 (1.m)
where 0<e<2047.

Student Activity 1.2


Answer the following questions.
1. In a 16-bit fixed point representation 1 bit is used for sign and 5 bits are used for integer part. Find
the maximum and minimum numbers which can be represented in this notation.
16 ARTIFICIAL INTELLIGENCE

2. What is normalized floating point representation for real numbers?


3. Represent the number 11011.101 in IEEE 754 standard for floating point numbers.

Summary

 Numbers are represented by a string of digit symbols


 The binary number system uses the base 2, the octal 8 and hexadecimal 16.
 Remainder Method is the most commonly used method for carrying out conversions from decimal
system to other systems. It involves the following steps:
 Divide the given number of decimal system by the radix R of the proposed system. From
this, get a quotient Q1 and a remainder R1.
 Dividing the quotient Q1 by the radix R again to get quotient Q2 and a remainder R2.
 Divide the quotient Q2 by the radix R again to get quotient Q3 and a remainder R3.
 American Standard Code for Information Interchange uses seven bits to code 128 characters

Self-assessment Questions

Fill in the blanks (Solved)

1. (11011.1001)2 = (_________________________________________)8
2. ASCII stands for________________________________________

Answers

1. Shl
2. 6

True or False (Solved)

1. Memory read micro-operation takes 10 clock cycles.


2. A microprogram is a set of micro-operations.

Answers

1. False
2. True

Fill in the blanks (Unsolved)

1. The channel through which CPU and memory accomplish using ____________.
2. Mirco-operation for adding content of memory location 5 to the content of register R1 is
____________.
WHAT IS ARTIFICIAL INTELLIGENCE 17

True or False (Unsolved)

1. Accumulator is a decoder.
2. Control unit is a part of ALU.

Detailed Questions

1. Find the decimal equivalent of the following binary numbers:


i. 1101011
ii. 111101101
iii. 100001
iv. 111111
2. Find the decimal equivalent of the following binary numbers:
i. 0.01110
ii. 111.00110
iii. 1101.0011
iv. 1111.0001
3. What is the advantage of using hexadecimal numbers?
4. Convert the following binary numbers into decimal and hexadecimal equivalents
i. 45.525
ii. 87.1250
5. In a number system, the symbols used are 0, 1, 2, 3, 4. What is the base of the system?
6. Find the 1’s and 2’s complement of the following binary numbers:
i. 1010110
ii. 0110110
iii. 1101.0011
iv. 1101.1100
7. Find the 10’s complement of (9456)11.
8. Perform the subtraction of following decimal numbers using (a) 10’s complement (b) 9’s
complement. Check the answer by direct subtraction.
i. 5432-1234
ii. 876.45-283.4
iii. 5438-9432
18 ARTIFICIAL INTELLIGENCE

iv. 124.43-876.85
9. Write first 20 decimal numbers in base 5.
10. Fill in the blanks:
i. The 10’s complement of (5432)11 is________________________

ii.  9876  10   5432  10 using 9’s complement is________________

v. Acronym IEEE stands for________________________________

You might also like