Computer Architecture & Organization Class Notes: INFORMATION REPRESENTATIO |
top of page

Information Representation: Computer Architecture & Organization Class Notes

Updated: Oct 22, 2022

Mobiprep has created last-minute notes for all topics of CAO to help you with the revision of concepts for your university examinations. So let’s get started with the lecture notes on CAO.

Our team has curated a list of the most important questions asked in universities such as DU, DTU, VIT, SRM, IP, Pune University, Manipal University, and many more. The questions are created from the previous year's question papers of colleges and universities.



Information Representation


Question 1) Why Booth’s multiplication came into picture instead of using sequential multiplication?

Answer) In terms of machine, multiplication is actually repetitioning addition and this repetitive addition results in a common issue that the processor takes a lot of time in calculating it. Booth’s algorithm is a multiplication algorithm that multiplies two signed binary numbers in 2’s compliment notation. Booth uses desk calculators that were faster at shifting than adding and created the algorithm to increase their speed. Another advantage of Booth multiplier is, it reduces the number of partial products, thus make it extensively used in multiplier with long operand.


 

Question 2) What is difference between restoring and no-restoring division method for unsigned number? Draw the flow chart for each of the methods.

Answer) An algorithm which deals with two integer A and B computes their remainder and quotient is called division algorithm. Division algorithms are of two types slow algorithms and fast algorithms. Restoring as well as non restoring algorithms are the example of slow algorithms


Restoring algorithm:

Restoring term is due to fact that value of register A is restored after each iteration. Here, register Q contain quotient and register A contain remainder. Here, n-bit dividend is loaded in Q and divisor is loaded in M. Value of Register is initially kept 0 and this is the register whose value is restored during iteration due to which it is named Restoring.


Restoring algorithm in CAO class notes
Restoring algorithm

Let’s pick the step involved:

  • Step-1: First the registers are initialized with corresponding values (Q = Dividend, M = Divisor, A = 0, n = number of bits in dividend)

  • Step-2: Then the content of register A and Q is shifted left as if they are a single unit

  • Step-3: Then content of register M is subtracted from A and result is stored in A

  • Step-4: Then the most significant bit of the A is checked if it is 0 the least significant bit of Q is set to 1 otherwise if it is 1 the least significant bit of Q is set to 0 and value of register A is restored i.e. the value of A before the subtraction with M

  • Step-5: The value of counter n is decremented

  • Step-6: If the value of n becomes zero, we get of the loop otherwise we repeat from step 2

  • Step-7: Finally, the register Q contain the quotient and A contain remainder


Non-restoring algorithm:

Non-Restoring division is less complex than the restoring one because simpler operation is involved i.e. addition and subtraction, also now restoring step is performed. In the method, rely on the sign bit of the register which initially contain zero named as A.


Non-restoring algorithm in CAO class notes
Non-restoring algorithm

Let’s pick the step involved:

  • Step-1: First the registers are initialized with corresponding values (Q = Dividend, M = Divisor, A = 0, n = number of bits in dividend)

  • Step-2: Check the sign bit of register A

  • Step-3: If it is 1 shift left content of AQ and perform A = A+M, otherwise shift left AQ and perform A = A-M (means add 2’s complement of M to A and store it to A)

  • Step-4: Again, the sign bit of register A

  • Step-5: If sign bit is 1 Q [0] become 0 otherwise Q [0] become 1 (Q [0] means least significant bit of register Q)

  • Step-6: Decrements value of N by 1

  • Step-7: If N is not equal to zero go to Step 2 otherwise go to next step

  • Step-8: If sign bit of A is 1 then perform A = A+M

  • Step-9: Register Q contain quotient and A contain remainder



 

Question 3) Convert decimal number 5.8125 to binary, octal, hexadecimal number system?

Answer) Conversion to binary:

To covert a decimal number to its binary equivalent split it into two parts

A) 5 i.e. the number before decimal

B) 8125 i.e. the number after decimal

For solving part, A factorize the number with 2

Prime factorization of 5

2 |5 1

2 |2 0

|1

Now write all the reminder from bottom to top so the number is 101

For solving part b i.e., the decimal part multiplies the decimal by 2 and save the number which is ahead of decimal and again multiply the rest with 2.

0.8125*2 = 1.6251

0.625*2 = 1.251

0.25*2 = 0.50

0.5*2 = 1

Now write from top to bottom so 1101

So, the overall binary conversion of the number is 101.1101


For octal conversion repeat the same process with base 8 instead of 2 i.e. multiple the decimal value by 8 and factorize 5 by 8

8 | 5 = 5

0.8125*8 = 6.56

0.5*8 = 44

= 64

So, the number is 5.64


For hexa-decimal factorize the decimal number by 16 and multiple point values with 16

16 | 5 = 5

0.8125 *16 = 13.0

In hexadecimal 13 is D

So, the number is 5.D


 

Question 4) Calculate 1's and 2's complement of 123.

Answer) For calculation 1’s and 2’s complement of any number first changes the decimal number to binary.

Convert 123 to binary by factorizing it by 2

So binary equivalent of 123 is 1111011

For 1’s complement replaces all 1 by 0 and 0 by 1 so the number is:

0000100 ==1s complement

For 2’s complement

First convert the number to is one’s complement i.e. 0000100

Now add 1 to the number

0000100

+ 1

______________

0000101

So, 0000101 is the 2’s complement of 123



 

Question 5) Explain r and r-1 complement by giving a suitable example?

Answer) Consider r=10 and the number 65

Now to calculate r’s complement use the formula

rn-N

Here n is the number if digits present in number N

So, (10)2-65

100-65

35

For r-1 complement

rn-N-1

(10)2-65-1

100-66


 

Question 6) What is the difference between weighted and non-weighted binary codes?

Answer) Weighted Codes:

The main characteristic of a weighted code is, each binary bit is assigned by a “weight” and values depend on the position of the binary bit. The sum of the weights of these binary bits, whose value is 1 is equal to the decimal digit which they represent.

Example of weighted codes are BCD, ASCII

Weighted codes are used in:

a) Data manipulation during arithmetic operation.

b) For input/output operations in digital circuits.

c) To represent the decimal digits in calculators, volt meters etc.


Non-Weighted Codes:

Non-weighted or un-weighted codes are those codes in which the digit value does not depend upon their position i.e., each digit position within the number is not assigned fixed value.

Examples of non-weighted codes are, Excess-3 code and Gray code.

Non weighted codes are used in:

a) To perform certain arithmetic operations.

b) Shift position encodes.

c) Used for error detecting purpose.



 

Question 7) Why is UNICODE accepted and widely used?

Answer) The extended version of the ASCII character set is not enough for international use. . The Unicode character set uses 16 bits per character. Therefore, the Unicode character set can represent 216, or over 65 thousand, characters. Unicode was designed to be a superset of ASCII. That is, the first 256 characters in the Unicode character set correspond exactly to the extended ASCII character set.


 

Question 8) Convert binary number 11001010 to gray code?

Answer) To convert a binary number to gray code, follow the steps:

STEP 1. Record Most significant bit.

STEP 2. Add this bit to next position. Ignore the carry & record the Sum.

STEP 3. Continue recording Sum until LSB is reached.

STEP 4. Gray Code Number will have same number of bits as Binary Number.


A= 1 1 0 0 1 0 1 0

1 2 3 4 5 6 7 8

The most significant bit is at 1st index i.e. 1

So, write 1

Now add 0thand 1st position element and if any carry ignores it and write the number 1+1=0 carry 1 so the next number is 0.

Similarly repeat the process until you reach the last element.


Conversion of Binary Number to Gray Code in CAO class notes
Conversion of Binary Number to Gray Code

So, 1101110 is the gray code number of 11001010



 

Question 9) Explain BCD conversion of a number by giving suitable example.

Answer) The BCD code consists of the first ten values (0 to 9) of the 16 4-bit (8,4,2,1) binary codes. BCD can be used to encode the digits of a decimal number separately in binary,

Let’s take an example to understand better

(863)10

To convert it into Binary coded decimal number, convert each individual number to its binary number of 4 bits

So, 8 in binary is 1000

6 in binary is 0110

3 in binary is 0011

So, the BCD Equivalent is (1000 0110 0011) BCD






214 views0 comments
bottom of page