CA important questions with solution (AutoRecovered)

You might also like

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 37

CA important questions with solution

UNIT 1

2 marks

1. What is BCD?
BCD is a system of writing numerals that
assigns a four-digit binary code to each digit 0-
9.

2. What is weighted codes and non-weighted codes?


Weighted binary codes are those which follow the positional weighting
principles wherein each position of the number represents a specific weight.
Like 8421, 2421, and 5211 are weighted binary codes. Non weighted codes
are codes that are not placed weighted.

3. Give the steps to convert gray code to binary code?


The MSB in the binary is the same as the corresponding MSB in the gray code
going from left to right each binary code generated is added to the gray code bit in
the next adjacent position and the carries are ignored.

4. What are universal gates?


A universal gate is a gate which can implement any Boolean function without need
to use any other gate type. The NAND and NOR gates are universal gates.

5. What is a flip flop? Mention the types of flip flop?


Flip-flop is a circuit that maintains a state until directed by input to change the state.
A basic flip-flop can be constructed using four-NAND or four-NOR gates. Types of
flip-flops:

RS Flip Flop
JK Flip Flop
D Flip Flop
T Flip Flop

6. Define redundant group?


A group of 1s or 0s whose all members are overlapped by other groups is called
redundant group.

7. State De Morgan’s theorem


De Morgan's theorem states (Equation 1.16) that complementing the result of
OR'ing variables together is equivalent to AND'ing the complements of the
individual variables.

8. What is rolling of k-map?


Map Rolling : Map rolling means roll the map considering the map as if its left
edges are touching the right edges and top edges are touching bottom edges. While
marking the pairs quads and octet, map must be rolled.

9. Write the truth table and Logic Symbol of OR gate


10. Convert (67)10 to (?)2

11. What is Computer Architecture?


Computer architecture can be defined as a set of rules and methods that describe the
functionality, organization, and implementation of computer systems.

12. What is Boolean Algebra?


13. What do you mean my toggling?

14. What is don’t Condition?


The "Don't care" condition says that we can use the blank cells of a K-map to
make a group of the variables.

15. Draw the block diagram of master slave flip flop?


16. Define positive edge trigger.
17. How are IC’s Classified?

18. What are Encoders?


An Encoder is a combinational circuit that performs the reverse operation of
Decoder. It has maximum of 2^n input lines and ‘n’ output lines, hence it encodes
the information from 2^n inputs into an n-bit code. It will produce a binary code
equivalent to the input, which is active High. Therefore, the encoder encodes 2^n
input lines with ‘n’ bits.

19. Define Shift register.


A group of flip flops which is used to store multiple bits of data and the data is
moved from one flip flop to another is known as Shift Register

20. What is Integrated Circuit?


An integrated circuit (IC) is a small semiconductor-based electronic device
consisting of fabricated transistors, resistors and capacitors. Integrated circuits are
the building blocks of most electronic devices and equipment.

An integrated circuit is also known as a chip or microchip

21. Differentiate between encoder and decoder.

Encoder circuit basically converts the applied information signal into a coded digital
bit stream.

Decoder performs reverse operation and recovers the original information signal
from the coded bits.

22. Differentiate between Multiplexer and Demultiplexer.


Multiplexer is a data selector which takes several inputs and gives a single output. In
multiplexer we have 2n input lines and 1 output lines where n is the number of
selection lines.
Demultiplexer is a data distributor which takes a single input and gives several
outputs. In demultiplexer we have 1 input and 2n output lines where n is the selection
line.

23. What is counter?


A Counter is a device which stores (and sometimes displays) the number of times a
particular event or process has occurred, often in relationship to a clock signal.

24. What is bidirectional register?


Bidirectional shift registers are the registers which are capable of shifting the
data either right or left depending on the mode selected

25. What is combinational circuit?


Combinational circuit is a circuit in which we combine the different gates in the
circuit, for example encoder, decoder, multiplexer and demultiplexer.

26. What is sequential circuit?


The sequential circuit is a special type of circuit that has a series of inputs and
outputs. The outputs of the sequential circuits depend on both the combination of
present inputs and previous outputs

27. What is multiplexer?


Multiplexer is a data selector which takes several inputs and gives a single output. In
multiplexer we have 2n input lines and 1 output lines where n is the number of
selection lines.

28. What is self-complementing, weighted and excess-3 code with an example

The sum of binary number and its complement is always equal to decimal 9. In other
words, the 1’s complement of an excess-3 code is the excess-3 code for the 9’s
complement of the corresponding decimal number.
For example, the excess-3 code for decimal number 5 is 1000 and 1’s complement
of 1000 is 0111, which is excess-3 code for decimal number 4, and it is 9’s
complement of number 5.

29. Find 9’s and 10’s complement for the number 56483

99999 – 56483 = 43516 (9s complement)

43516 + 1 = 43517 (10s complement)

30. What is excitation table and state diagram?

In electronics design, an excitation table shows the minimum inputs that are
necessary to generate a particular next state when the current state is known.
4 Marks:
1. Write the steps of 1’s and 2’s complement subtraction and demonstrate with an
example
Subtraction using 1’s complement
Unsigned numbers

There are two cases


The number of digits of minuend are less than the comprehend
The comprehend is smaller than minuend or the number of digits of comprehend are
lesser than minuend
The number of digits of minuend are less than the comprehend

Inserting zero‘s to left of the minuend


Take 1‘s complement for minuend
Add both comprehend and minuend
Carry that is generated is added to LSB to obtain result

Eg: Subtract 1100 from 1101001

The comprehend is smaller than minuend or the number of digits of comprehend are
lesser than minuend
Inserting zero‘s to left of the comprehend
Take 1‘s complement for minuend
Add both comprehend and minuend
There is no end around Carry so the result is to be again take 1‘s complement
Eg: Subtract 110100101 from 110101

2. K Map Question without Don’t Care


3. K Map Question with Don’t Care

4. What is Half Adder? Explain with circuit diagram and truth table.
The Half-Adder is a basic building block of adding two numbers as two inputs and
produce out two outputs. The adder is used to perform OR operation of two single bit
binary numbers. The augent and addent bits are two input states, and 'carry'
and 'sum 'are two output states of the half adder.

Block diagram
Truth Table

In the above table,

1. 'A' and' B' are the input states, and 'sum' and 'carry' are the output states.
2. The carry output is 0 in case where both the inputs are not 1.
3. The least significant bit of the sum is defined by the 'sum' bit.
The SOP form of the sum and carry are as follows:
Sum = x'y+xy'
Carry = xy

5. What is Full Adder? Explain with circuit diagram and truth table
The half adder is used to add only two numbers. To overcome this problem, the full
adder was developed. The full adder is used to add three 1-bit binary numbers A, B,
and carry C. The full adder has three input states and two output states i.e., sum and
carry.
Block diagram

Truth table

In the above table,

1. 'A' and' B' are the input variables. These variables represent the two significant bits
which are going to be added

2. 'Cin' is the third input which represents the carry. From the previous lower significant
position, the carry bit is fetched.

3. The 'Sum' and 'Carry' are the output variables that define the output values.

4. The eight rows under the input variable designate all possible combinations of 0 and 1
that can occur in these variables

Sum = x' y' z+x' yz+xy' z'+xyz


Carry = xy+xz+yz
6. What are Shift register? Explain with suitable diagram

Flip flops can be used to store a single bit of binary data (1or 0). However, in
order to store multiple bits of data, we need multiple flip flops. N flip flops are
to be connected in an order to store n bits of data. A Register is a device which
is used to store such information. It is a group of flip flops connected in series
used to store multiple bits of data.
The information stored within these registers can be transferred with the help
of shift registers

The registers which will shift the bits to left are called “Shift left registers”.
The registers which will shift the bits to right are called “Shift right registers”.

Shift registers are basically of 4 types. These are:


1. Serial In Serial Out shift register
2. Serial In parallel Out shift register
3. Parallel In Serial Out shift register
4. Parallel In parallel Out shift register

Serial-In Serial-Out Shift Register (SISO) –


The shift register, which allows serial input (one bit after the other through a single data
line) and produces a serial output is known as Serial-In Serial-Out shift register. Since
there is only one output, the data leaves the shift register one bit at a time in a serial
pattern, thus the name Serial-In Serial-Out Shift Register.

The logic circuit given below shows a serial-in serial-out shift register. The circuit
consists of four D flip-flops which are connected in a serial manner. All these flip-flops
are synchronous with each other since the same clock signal is applied to each flip flop.
7. 8 Marks:

1. What are sequential circuit? For the following equation:


DA = Ax+Bx
DB = A’x
Y=Ax'+Bx
Derive state table and state diagram.

2. What are Counters? Construct and explain the 4-bit counter with circuit diagram and
state table.
3. What is Multiplexer? Explain 4 X1 Multiplexer with truth table and logic diagram
here
4. What is Decoder? Explain 3 X8 decoder with truth table and logic diagram
Here, also here
5. What is Encoder? Explain 8X3 encoder with truth table and logic diagram.

8 to 3 line Encoder:
The 8 to 3 line Encoder is also known as Octal to Binary Encoder. In 8 to 3 line
encoder, there is a total of eight inputs, i.e., Y 0, Y1, Y2, Y3, Y4, Y5, Y6, and Y7 and three
outputs, i.e., A0, A1, and A2. In 8-input lines, one input-line is set to true at a time to get
the respective binary code in the output side. Below are the block diagram and the
truth table of the 8 to 3 line encoder.

Block Diagram:
Truth Table:

The logical expression of the term A0, A1, and A2 are as follows:

A2=Y4+Y5+Y6+Y7
A1=Y2+Y3+Y6+Y7
A0=Y7+Y5+Y3+Y1

Logical circuit of the above expressions is given below:

6. Explain 4-bit register with parallel load with a neat diagram


7. What is combinational circuit? What are the steps involved in the design of a
combinational circuit?
Idhar click karo
A Combinational Circuit consist of logic gates whose outputs at any instant of time are
determined directly from the present combination of inputs without regard to previous
input. Examples of combinational circuits: Adder, Subtractor, Converter, and
Encoder/Decoder.
Here we are going to learn how to construct and analyze any type of combinational
circuit using four general steps. I am going to explain this trick with the help of the one
combinational circuit and you can apply the same for implementing other
combinational circuits.
Following are the four steps to construct and analyze any combinational circuit.
 Step-1: Identify the number of inputs and outputs of the circuit.
First of all, we have to think about the inputs and outputs of the circuit by considering
which type of logical operation we want to perform with the circuit.
For example, we have to create a circuit that can add two bits. For this, we require two
inputs (one for the first bit (A) another for the second bit (B)) and two outputs one for
sum (S) of two bits and another for carry (C).
In total, we require 2 inputs and 2 outputs. So here our first step is completed.
 Step-2: Creating the Truth Table.
In this step we have to create truth table for our circuit so for this first we will create
input columns and list all the possible combinations of inputs. In our case 2 bits can
have maximum 4 combinations (00 01 10 11).
Now in output, we have two columns (Sum and Carry) as discussed earlier. Now we
have to fill output columns in such a way that for which logical operation we are
constructing circuit.
In our circuit, we want addition so we will add those input bits and write the sum of
those bits in (Sum) column and if carry is generated we will write 1 else write.
0 in (Carry) column.

 Step-3: Simplify the Boolean function for each output.


In this step, we have to just create a simplified Boolean function according to inputs and
outputs of the truth table obtained in the previous step.
For Sum,
Sum = A'B + AB' = A XOR B
For Carry,
Carry = AB = A AND B
 Step-4: Constructing circuit using Boolean function obtained from third step.
For sum, we have obtained (A XOR B) so we will connect A and B to the inputs of
XOR gate and take its output as a sum. For carry, we have obtained (A AND B) so we
will connect A and B to the inputs of AND gate and take its output as a carry.

Now in this circuit, if you provide input at A and B ends. You will get the output on
sum and carry ends according to truth table we have created above. So here we have
completed our four steps for creating the combinational circuit.
So, we have created a combinational circuit called Half Adder. You can apply the
same steps to create any other combinational circuit.

8. Explain flip flop and its types?

Skip 😊
2 Marks
1. What is instruction?
2. What are registers?
3. Define program
4. What does CLA instruction do?
The CLA instruction clears the accumulator, places zeros in the AC.
5. Define Instruction cycle.
A program residing in the memory unit of a computer consists of a sequence of
instructions. These instructions are executed by the processor by going through a
cycle for each instruction.

6. List the types of instructions.


A basic computer has three instruction code formats which are:

Memory - reference instruction


Register - reference instruction
Input-Output instruction

7. Write the instruction format.


Memory - reference instruction

Register - reference instruction

8. What is Addressing mode.


The term addressing modes refers to the way in which the operand of an instruction
is specified. The addressing mode specifies a rule for interpreting or modifying the
address field of the instruction before the operand is actually executed.

9. List any four Addressing modes.


10. Define CISC and RISC.
CISC is the complex instruction set computer, CISC systems try to reduce the
number of instructions programs must call.

RISC is the reduced instruction set computer, RISC systems seek to improve
performance by reducing the number of clock cycles required to perform tasks.

11. What is the purpose of program counter?


A program counter is a register in a computer processor that contains the address
(location) of the instruction being executed at the current time. As each instruction
gets fetched, the program counter increases its stored value by 1
12. What is BSA and BUN
BUN (Branch Unconditionally): This instruction mentions the address of an
instruction that is to be executed out of sequence.

BSA: The ‘Branch and Save Return Address’ (BSA) instruction transfers the
execution of a program to another portion (a subroutine) which is to be executed out
of sequence.

13. Distinguish between FGI and FGO


FGI=1 means the input device is ready, but that really means a new input is available
(e.g. the user typed a key on a keyboard) and the processor should accept it.

FGO=1 prevents the input device(s) from overwriting a prior input held in INPR
that the processor hasn't accepted yet

14. What are the types of CPU organization?


CPU organization is of three types based on the number of address fields:

Single Accumulator organization


General register organization
Stack organization

15. What is ROR and ROL


Rotator—rotates a number in a circle such that empty spots are filled with bits
shifted off the other end.

Example: 11001 ROR 2 = 01110; 11001 ROL 2 = 00111. ROR = rotate right; ROL =
rotate left.

16. What is RORC and ROLC


RORC is rotation with carry to right and ROLC is rotation with carry to left

17. What is direct address and indirect address?


1. Direct Addressing Mode: In direct addressing mode, the address field in the
instruction contains the effective address of the operand and no intermediate memory
access is required
2. Indirect Addressing Mode: In Indirect addressing mode, the address field in the
instruction contains the memory location or register where the effective address of the
operand is present.

4 Marks
1. List the difference between CISC and RISC.
2. What are instructions? Explain the various types of instructions Memory, Register,
IO
3. What are instruction formats? Explain various types of instruction formats
with example
answer

4. Explain common Bus system?


5. Explain Computer register?
Answer
6. What are Input output instructions?
Input/Output – These instructions are for communication between computer and
outside environment. The IR(14 – 12) is 111 (differentiates it from memory
reference) and IR(15) is 1 (differentiates it from register reference instructions). The
rest 12 bits specify I/O operation.
The I/O instructions are needed for the following objectives −
 It is used to analyzing flag bits.
 It can transfer data to or from the AC register.
 It can control interrupts.

7. Explain memory reference instruction

Memory Reference – These instructions refer to memory address as an operand.


The other operand is always accumulator. Specifies 12-bit address, 3-bit opcode
(other than 111) and 1-bit addressing mode for direct and indirect addressing.

Memory reference instructions are those commands or instructions which are in the
custom to generate a reference to the memory and approval to a program to have an
approach to the commanded information and that states as to from where the data is
cache continually. These instructions are known as Memory Reference Instructions.

There are seven memory reference instructions which are as follows &

AND
The AND instruction implements the AND logic operation on the bit collection from
the register and the memory word that is determined by the effective address. The
result of this operation is moved back to the register.

ADD
The ADD instruction adds the content of the memory word that is denoted by the
effective address to the value of the register.
LDA
The LDA instruction shares the memory word denoted by the effective address to the
register.

STA
STA saves the content of the register into the memory word that is defined by the
effective address. The output is next used to the common bus and the data input is
linked to the bus. It needed only one micro-operation.

BUN
The Branch Unconditionally (BUN) instruction can send the instruction that is
determined by the effective address. They understand that the address of the next
instruction to be performed is held by the PC and it should be incremented by one to
receive the address of the next instruction in the sequence. If the control needs to
implement multiple instructions that are not next in the sequence, it can execute the
BUN instruction.

BSA
BSA stands for Branch and Save return Address. These instructions can branch a
part of the program (known as subroutine or procedure). When this instruction is
performed, BSA will store the address of the next instruction from the PC into a
memory location that is determined by the effective address.

ISZ
The Increment if Zero (ISZ) instruction increments the word determined by effective
address. If the incremented cost is zero, thus PC is incremented by 1. A negative
value is saved in the memory word through the programmer. It can influence the zero
value after getting incremented repeatedly. Thus, the PC is incremented and the next
instruction is skipped.

8. Explain register reference instruction


Register Reference – These instructions perform operations on registers rather
than memory addresses. The IR(14 – 12) is 111 (differentiates it from memory
reference) and IR(15) is 0 (differentiates it from input/output instructions). The
rest 12 bits specify register operation.
8 Marks
1. Explain the various addressing modes available.
The term addressing modes refers to the way in which the operand of an instruction
is specified. The addressing mode specifies a rule for interpreting or modifying the
address field of the instruction before the operand is actually executed.

In a microprocessor, the machine needs to be told how to get the operands to perform
the operation. The effective address is a term that describes the address of an
operand that is stored in memory. There are several methods to designate the
effective address of those operands or get them directly from the register. These
methods are known as addressing modes.

Implied mode:: In implied addressing the operand is specified in the instruction


itself. In this mode the data is 8 bits or 16 bits long and data is the part of instruction.
Zero address instruction are designed with implied addressing mode.

Immediate addressing mode (symbol #):In this mode data is present in address
field of instruction .Designed like one address instruction format.
Note:Limitation in the immediate mode is that the range of constants are restricted
by size of address field.
Register mode: In register addressing the operand is placed in one of 8 bit or 16 bit
general purpose registers. The data is in the register that is specified by the
instruction.
Here one register reference is required to access the data.

Register Indirect mode: In this addressing the operand’s offset is placed in any one
of the registers BX,BP,SI,DI as specified in the instruction. The effective address of
the data is in the base register or an index register that is specified by the instruction.
Here two register reference is required to access the data.

Auto Indexed (increment mode): Effective address of the operand is the contents of
a register specified in the instruction. After accessing the operand, the contents of
this register are automatically incremented to point to the next consecutive memory
location.(R1)+.
Here one register reference,one memory reference and one ALU operation is
required to access the data.

 Auto indexed ( decrement mode): Effective address of the operand is the contents of
a register specified in the instruction. Before accessing the operand, the contents of
this register are automatically decremented to point to the previous consecutive
memory location. –(R1)
Here one register reference,one memory reference and one ALU operation is
required to access the data.

Direct addressing/ Absolute addressing Mode (symbol [ ]): The operand’s offset
is given in the instruction as an 8 bit or 16 bit displacement element. In this
addressing mode the 16 bit effective address of the data is the part of the instruction.
Here only one memory reference operation is required to access the data.

Indirect addressing Mode (symbol @ or () ):In this mode address field of


instruction contains the address of effective address.Here two references are
required.
1st reference to get effective address.
2nd reference to access the data.
Based on the availability of Effective address, Indirect mode is of two kind:
1. Register Indirect:In this mode effective address is in the register, and corresponding
register name will be maintained in the address field of an instruction.
Here one register reference,one memory reference is required to access the data.
2. Memory Indirect:In this mode effective address is in the memory, and corresponding
memory address will be maintained in the address field of an instruction.
Here two memory reference is required to access the data.

2. Explain the timing and control with block diagram

3. Draw and explain the instruction cycle flowchart

A program residing in the memory unit of a computer consists of a sequence of


instructions. These instructions are executed by the processor by going through a
cycle for each instruction.

In a basic computer, each instruction cycle consists of the following phases:

1. Fetch instruction from memory.


2. Decode the instruction.
3. Read the effective address from memory.
4. Execute the instruction.

In computer architecture, input-output devices act as an interface between the


machine and the user.
Instructions and data stored in the memory must come from some input device. The
results are displayed to the user through some output device.
The following block diagram shows the input-output configuration for a basic
computer.

o The input-output terminals send and receive information.


o The amount of information transferred will always have eight bits of an alphanumeric
code.
o The information generated through the keyboard is shifted into an input register
'INPR'.
o The information for the printer is stored in the output register 'OUTR'.
o Registers INPR and OUTR communicate with a communication interface serially and
with the AC in parallel.
o The transmitter interface receives information from the keyboard and transmits it to
INPR.
o The receiver interface receives information from OUTR and sends it to the printer
serially.

4. Explain the flowchart for interrupt cycle


5. Explain stack organization
Stack is also known as the Last In First Out (LIFO) list. It is the most important feature in
the CPU. It saves data such that the element stored last is retrieved first. A stack is a memory
unit with an address register. This register influence the address for the stack, which is
known as Stack Pointer (SP). The stack pointer continually influences the address of the
element that is located at the top of the stack.
It can insert an element into or delete an element from the stack. The insertion operation is
known as push operation and the deletion operation is known as pop operation. In a
computer stack, these operations are simulated by incrementing or decrementing the SP
register.

Register Stack
The stack can be arranged as a set of memory words or registers. Consider a 64-word register
stack arranged as displayed in the figure. The stack pointer register includes a binary
number, which is the address of the element present at the top of the stack. The three-
element A, B, and C are located in the stack.
The element C is at the top of the stack and the stack pointer holds the address of C that is 3.
The top element is popped from the stack through reading memory word at address 3 and
decrementing the stack pointer by 1. Then, B is at the top of the stack and the SP holds the
address of B that is 2. It can insert a new word, the stack is pushed by incrementing the stack
pointer by 1 and inserting a word in that incremented location.

The stack pointer includes 6 bits, because 2 6 = 64, and the SP cannot exceed 63 (111111 in
binary). After all, if 63 is incremented by 1, therefore the result is 0(111111 + 1 = 1000000).
SP holds only the six least significant bits. If 000000 is decremented by 1 thus the result is
111111.
Therefore, when the stack is full, the one-bit register ‘FULL’ is set to 1. If the stack is null,
then the one-bit register ‘EMTY’ is set to 1. The data register DR holds the binary
information which is composed into or readout of the stack.
First, the SP is set to 0, EMTY is set to 1, and FULL is set to 0. Now, as the stack is not full
(FULL = 0), a new element is inserted using the push operation.
The push operation is executed as follows −

SP←SP + 1 It can increment stack pointer

K[SP] ← DR It can write element on top of the stack

If (SP = 0) then (FULL ← Check if stack is full


1)

EMTY ← 0 Mark the stack not empty


6. Explain data transfer and manipulation instructions
7. Explain microprocessor instruction
8. Explain data transfer instructions
9. Explain the CPU organization

10. Explain data manipulation instruction

Data manipulation instructions are those instructions that manipulate or change the
content of the data/registers/memory. It performs operations on data and provides
the computational capabilities of the computer.
Data manipulation instructions can be categorized into three parts:
1) Arithmetic instruction
2) Logical and bit manipulation instructions
3) Shift instructions

Arithmetic Instruction
Arithmetic instructions include increment, decrement, add, subtract, multiply, divide, add
with Carry, subtract with Borrow, negate that is (2’s) two's complement. If there’s a negative
number, it is considered as negate (so two's complement).
Generally, most computers carry instructions for all four of these operations. If computers
have only addition(ADD) and possibly subtraction(SUB) instructions, the other two
operations, i.e. multiplication(MUL) and division(DIV) must be generated using software
subroutines. These four basic arithmetic operations are sufficient for solving scientific
problems when expressed in numerical analysis methods.
The table given below shows the Arithmetic Instructions:

Name Mnemonic

Increment INC

Decrement DEC

Add ADD

Subtract SUB

Multiply MUL

Divide DIV
Add with carry ADDC

Subtract with borrow SUBB

Logical and Bit manipulation Instruction


We are having another list of instructions that is logical and bit manipulation instructions
starting with clear (that means clear the content of accumulator), complement the
accumulator, AND, OR, Exclusive-OR, Clear carry, Set carry, Complement carry, Enable
interrupts, Disable interrupts, all these are logical and bit manipulation instructions.
These logical instructions consider each operand bit individually and treat it as a Boolean
variable. Basically, logical instructions help perform binary operations on strings of bits
stored in registers.
 Clear instruction means making all the bits of a register ‘0’.
 AND instruction is sometimes referred to as bit clear instruction or mask.
 OR instruction is sometimes referred to as bit set instruction.
 Set instruction means making all the bits of a register ‘1’.
 XOR instruction is referred to as bit complement instruction.

Name Mnemonic

Clear CLR

Complement COM

AND AND

OR OR

Exclusive-OR XOR

Clear carry CLRC

Set Carry SETC

Complement Carry COMC

Enable Interrupt EI
Disable Interrupt DI

Shift Instructions
Shift instructions allow the bits of a memory byte or register to be shifted one-bit place to
the right or the Left.
There are basically two types of shift instructions — arithmetic and logical. Arithmetic shifts
consider the contents of the memory byte or register to be a signed number. So, when the
shift is made, the number is arithmetically divided by two (right shift) or multiplied by two
(left shift). Logical shifts consider the contents of the register or memory byte to be just a bit
pattern when the shift is made.
 OP is opcode field
 RL (It tells whether to shift it right or left).
 REG (It determines which register is to be shifted).
 COUNT (It tells the number of places to be shifted).
 TYPE( It tells the type of shifting from the list given below).

In right-shift operations, zeros are shifted into high-order vacated positions. And in the case
of the left-shift operation, shifts the zero into low-order vacated positions.

Name Mnemonic

Logical Shift Right SHR

Logical Shift Left SHL

Arithmetic Shift Right SHRA

Arithmetic Shift Left SHLA

Rotate Right ROR

Rotate Left ROL

Rotate Right through


RORC
carry

Rotate Left through


ROLC
carry
UNIT – III

2 Marks
1. Define Register transfer.
2. What are micro operations?
micro-operations (also known as micro-ops) are the functional or atomic operations
of a processor. These are low level instructions used in some designs to implement
complex machine instructions. They generally perform operations on data stored in
one or more registers.
3. What is RTL?
RTL, register transfer language is used to describe micro-operations transfer among
registers. It is a kind of intermediate representation that is very close to assembly
language, such as that which is used in a compiler.
4. What is subroutine?

5. Define address sequencing.

Addressing sequence can increase the Control Address Register (CAR).

The addressing sequence provides a mapping from the instructions bits to a control
memory address.
6. What is Control memory?
A control memory is a part of the control unit.
The control memory consists of microprograms that are fixed and cannot be
modified frequently. They contain microinstructions that specify the internal control
signals required to execute register micro-operations.
7. Differentiate between microinstruction and microprogram.

8. List out Arithmetic micro operations


1. Addition
2. Subtraction
3. Increment
4. Decrement
5. Shift

9. List out Logic micro operations


AND, NAND, XOR, OR, NOR
10. List out shift micro operations
Logical shift, Circular shift, Arithmetic shift
11. List the types of bus.
12. What is selective complement operation
13. What is control word?
14. What is three state bus buffer?
15. Define PLD
A programmable logic device (PLD) is an electronic component used to
build reconfigurable digital circuits.
16. What is I/O command
When an address is made available in the addresss lines, a function code is placed in
the control line by the processor. Selected interface responds to the function code
and proceeds to execute it. The function code is referred to as an I/O command and is
in essence an instruction that is executed in the interface and its attached peripheral
unit.
17. What is DMA?
Direct Memory Access (DMA) is a capability provided by some
computer bus architectures that allows data to be sent directly from an attached
device (such as a disk drive) to the memory on the computer's motherboard.
18. What is memory mapped I/O
It is a method of performing input/output between the central processing unit and
peripheral devices in a computer. It uses the same address space to address both main
memory and I/O devices.

4 Marks
1. What are register? How are registers represented
2. What is BUS? Explain the uses of various lines with diagram
Alternatively known as an address bus, data bus, control bus, or local bus,
a bus is a link between components or devices connected to a computer. For
example, a bus carries data between a CPU and the system memory via
the motherboard.

The data bus is a signal line for exchanging the data between the CPU and the
memory, and between the CPU and I/O, and handles the data stored in the specified
location.
The address bus is a signal line that specifies the location of the memory and I/O.
When exchanging data, it is necessary to specify the takeoff-destination of the data
or the storage destination of the data.
The address bus specifies this location.

The control bus is a signal line that specifies whether to read or write to the location
specified by the address bus.
The memory and I/O specified on the address bus receive the data which sent on the
data bus when instructed "Write" by the control bus.

3. Explain how the memory transfer occurs in BUS


4. Explain Arithmetic micro operations
5. Explain Arithmetic logic operations
6. Explain two ways of implementing control unit
7. Explain the process of mapping of instructions
8. Microprogram control with example
9. Draw and explain sample format of symbolic microinstruction
10. Explain programmed I/O
11. Explain Interrupt-initiated I/O
12. Difference between Isolated I//O and memory mapped I/O
Isolated I/O Memory Mapped I/O

Memory and I/O have separate address


space Both have same address space

Due to addition of I/O addressable


All address can be used by the memory memory become less for memory

Separate instruction control read and write Same instructions can control both I/O
operation in I/O and Memory and Memory

In this I/O address are called ports. Normal memory address are for both

More efficient due to separate buses Lesser efficient

Larger in size due to more buses Smaller in size

It is complex due to separate logic is used Simpler logic is used as I/O is also
to control both. treated as memory only.

8 Marks
1. Explain microprogrammed control organization
2. What is address sequencing? Draw and explain the flowchart of Address sequencing
3. Explain micro operations in detail.
4. Draw the block diagram of control unit.

o A Hard-wired Control consists of two decoders, a sequence counter, and a number of


logic gates.
o An instruction fetched from the memory unit is placed in the instruction register (IR).
o The component of an instruction register includes; I bit, the operation code, and bits 0
through 11.
o The operation code in bits 12 through 14 are coded with a 3 x 8 decoder.
o The outputs of the decoder are designated by the symbols D0 through D7.
o The operation code at bit 15 is transferred to a flip-flop designated by the symbol I.
o The operation codes from Bits 0 through 11 are applied to the control logic gates.
o The Sequence counter (SC) can count in binary from 0 through 15.

5. Explain DMA? Draw its block diagram and also explain its working
Direct Memory Access (DMA) Controller is a hardware device that allows I/O
devices to directly access memory with less participation of the processor. DMA
controller needs the same old circuits of an interface to communicate with the CPU
and Input/Output devices.
The DMA controller has three registers as follows.
 Address register – It contains the address to specify the desired location in memory.
 Word count register – It contains the number of words to be transferred.
 Control register – It specifies the transfer mode.
Explanation :
The CPU initializes the DMA by sending the given information through the data bus.
 The starting address of the memory block where the data is available (to read) or
where data are to be stored (to write).
 It also sends word count which is the number of words in the memory block to be
read or write.
 Control to define the mode of transfer such as read or write.
 A control to begin the DMA transfer.

6. Explain I/O bus and Interface Module

I/O Bus and Interface Modules


The I/O bus is the route used for peripheral devices to interact with the computer processor.
A typical connection of the I/O bus to I/O devices is shown in the figure.

The I/O bus includes data lines, address lines, and control lines. In any general-purpose
computer, the magnetic disk, printer, and keyboard, and display terminal are commonly
employed. Each peripheral unit has an interface unit associated with it.
7. Explain modes of transfer?
8. Explain Instruction level parallelism?

UNIT – IV

2 Marks
1. What is Hit ratio?
A hit ratio is a calculation of cache hits, and comparing them with how many total
content requests were received
2. What is paging?
3. List the main types of memory.
4. Differentiate between primary and secondary memory.
Parameter Primary Memory Secondary Memory
The primary memory is
The secondary memory is always a non-volatile
Nature categorized as volatile &
memory.
nonvolatile memories.
These memories are also Secondary memory is known as a Backup memory
Alias
called internal memory. or Additional memory or Auxiliary memory.
Data cannot be accessed directly by the
Data is directly accessed by processor. It is first copied from secondary
Access
the processing unit. memory to primary memory. Only then CPU can
access it.
It’s a volatile memory
It’s a non-volatile memory so that that data can
meaning data cannot be
Formation be retained even after power
retained in case of power
failure.
failure.

5. What is RAM and ROM?


6. Explain RAID.
RAID (redundant array of independent disks), is one of several RAID schemes that
work by placing data on multiple disks and allowing input/output (I/O) operations to
overlap in a balanced way, improving performance
7. What is semiconductor memory?
8. What is cache memory?
cache memory, also called cache, supplementary memory system that temporarily
stores frequently used instructions and data for quicker processing by the central
processing unit (CPU) of a computer.
9. What is virtual memory?
Virtual memory is a common technique used in a computer's operating system (OS).
Virtual memory uses both hardware and software to enable a computer to
compensate for physical memory shortages, temporarily transferring data from
random access memory (RAM) to disk storage.
10. Mention the types of ROM.
11. Differentiate between virtual address and physical address
The logical address does not exist physically in the memory, and therefore it is
sometimes known as a virtual address. The physical address is a location in the
memory unit. The logical address is used as a reference to access the physical
address. The physical address cannot be accessed directly.
12. Define multiprocessor system
A multiprocessor system is defined as "a system with more than one processor",
and, more precisely, "a number of central processing units linked together to enable
parallel processing to take place". The key objective of a multiprocessor is to boost a
system's execution speed.
13. Define multi-threading system
multithreading is the ability of a central processing unit (CPU) (or a single core in a
multi-core processor) to provide multiple threads of execution concurrently,
supported by the operating system.
14. What is tightly coupled multiprocessor and loosely coupled multiprocessor

4 Marks
1. Difference between static RAM and Dynamic RAM
2. Explain the block diagram of RAM chip with the function table

o A 128 * 8 RAM chip has a memory capacity of 128 words of eight bits (one
byte) per word. This requires a 7-bit address and an 8-bit bidirectional data
bus.
o The 8-bit bidirectional data bus allows the transfer of data either from
memory to CPU during a read operation or from CPU to memory during
a write operation.
o The read and write inputs specify the memory operation, and the two chip
select (CS) control inputs are for enabling the chip only when the
microprocessor selects it.
o The bidirectional data bus is constructed using three-state buffers.
o The output generated by three-state buffers can be placed in one of the three
possible states which include a signal equivalent to logic 1, a signal equal to
logic 0, or a high-impedance state

3. Explain the block diagram of ROM chip with the function table

o A ROM chip has a similar organization as a RAM chip. However, a ROM can
only perform read operation; the data bus can only operate in an output
mode.
o The 9-bit address lines in the ROM chip specify any one of the 512 bytes
stored in it.
o The value for chip select 1 and chip select 2 must be 1 and 0 for the unit to
operate. Otherwise, the data bus is said to be in a high-impedance state.
4. Write a note on Memory Hierarchy
5. What is RAM? List the difference between SRAM and DRAM
6. List the characteristics of secondary storage device
7. Explain semiconductor memories
8. Explain RAID.

RAID or redundant array of independent disks is a data storage virtualization


technology that combines multiple physical disk drive components into one or more
logical units for data redundancy, performance improvement, or both.

It is a way of storing the same data in different places on multiple hard disks or solid-
state drives to protect data in the case of a drive failure. A RAID system consists of
two or more drives working in parallel. These can be hard discs, but there is a trend
to use SSD technology (Solid State Drives).

RAID combines several independent and relatively small disks into single storage of a
large size. The disks included in the array are called array members. The disks can
combine into the array in different ways, which are known as RAID levels. Each of
RAID levels has its own characteristics of:

o Fault-tolerance is the ability to survive one or several disk failures.


o Performance shows the change in the read and writes speed of the entire
array compared to a single disk.
o The array's capacity is determined by the amount of user data written to the
array. The array capacity depends on the RAID level and does not always
match the sum of the RAID member disks' sizes. To calculate the particular
RAID type's capacity and a set of member disks, you can use a free online
RAID calculator.

9. Explain multiprocessor interconnection structures


10. Explain multiprocessor architecture
A multiprocessor system is defined as "a system with more than one processor", and, more
precisely, "a number of central processing units linked together to enable parallel processing to
take place".[1][2][3]
The key objective of a multiprocessor is to boost a system's execution speed.

There are two types of multiprocessors, one is called shared memory multiprocessor and another
is distributed memory multiprocessor. In shared memory multiprocessors, all the CPUs shares
the common memory but in a distributed memory multiprocessor, every CPU has its own private
memory.
Applications of Multiprocessor –
1. As a uniprocessor, such as single instruction, single data stream (SISD).
2. As a multiprocessor, such as single instruction, multiple data stream (SIMD), which is
usually used for vector processing.
3. Multiple series of instructions in a single perspective, such as multiple instruction, single
data stream (MISD), which is used for describing hyper-threading or pipelined
processors.
4. Inside a single system for executing multiple, individual series of instructions in multiple
perspectives, such as multiple instruction, multiple data stream (MIMD).

Benefits of using a Multiprocessor –

Enhanced performance.
Multiple applications.
Multi-tasking inside an application.
High throughput and responsiveness.
Hardware sharing among CPUs.

11. Explain multi-threaded architecture


computer architecture, multithreading is the ability of a central processing unit
(CPU) (or a single core in a multi-core processor) to provide multiple threads of
execution concurrently, supported by the operating system. This approach differs
from multiprocessing.
Types of multi threading
1.fine grained multi threading
The purpose of Fine grained multithreading is to remove all data dependency stalls
from the execution pipeline
2.coarse grained multi threading
The simplest type of multithreading occurs when one thread runs until it is blocked
by an event that normally would create a long-latency stall. Such a stall might be a
cache miss that has to access off-chip memory, which might take hundreds of CPU
cycles for the data to return.
3.simultaneus multi threading
The most advanced type of multithreading applies to superscalar processors.
Whereas a normal superscalar processor issues multiple instructions from a single
thread every CPU cycle, in simultaneous multithreading (SMT) a superscalar
processor can issue instructions from multiple threads every CPU cycle.

8 Marks
1. What is ROM? Explain the various types of ROM
2. What is Cache Memory? Explain various types of cache mapping
Cache Memory is a special very high-speed memory. It is used to speed up and
synchronizing with high-speed CPU. Cache memory is costlier than main memory or
disk memory but economical than CPU registers. Cache memory is an extremely fast
memory type that acts as a buffer between RAM and the CPU
Cache Mapping:
There are three different types of mapping used for the purpose of cache memory
which are as follows: Direct mapping, Associative mapping, and Set-Associative
mapping. These are explained below.
Direct Mapping –
The simplest technique, known as direct mapping, maps each block of main memory
into only one possible cache line.
Associative Mapping –
In this type of mapping, the associative memory is used to store content and
addresses of the memory word. Any block can go into any line of the cache. This
means that the word id bits are used to identify which word in the block is needed,
but the tag becomes all of the remaining bits.
Set-associative Mapping –
This form of mapping is an enhanced form of direct mapping where the drawbacks
of direct mapping are removed. Set associative addresses the problem of possible
thrashing in the direct mapping method. It does this by saying that instead of having
exactly one line that a block can map to in the cache, we will group a few lines
together creating a set.

3. Explain virtual memory?


Virtual Memory is a storage allocation scheme in which secondary memory can be
addressed as though it were part of the main memory.
It is a technique that is implemented using both hardware and software. It maps memory
addresses used by a program, called virtual addresses, into physical addresses in computer
memory.
All memory references within a process are logical addresses that are dynamically translated
into physical addresses at run time.
A process may be broken into a number of pieces and these pieces need not be continuously
located in the main memory during execution.
Virtual memory is implemented using Demand Paging

Demand Paging is a popular method of virtual memory management. In demand paging, the
pages of a process which are least used, get stored in the secondary memory.
A page is copied to the main memory when its demand is made or page fault occurs. There
are various page replacement algorithms which are used to determine the pages which will
be replaced. We will discuss each one of them later in detail.
Advantages of Virtual Memory

1. The degree of Multiprogramming will be increased.


2. User can run large application with less real RAM.
3. There is no need to buy more memory RAMs.

Disadvantages of Virtual Memory

1. The system becomes slower since swapping takes time.


2. It takes more time in switching between applications.
3. The user will have the lesser hard disk space for its use.

You might also like