Some Important Previous Year Question Solutions (CA) - 1
Some Important Previous Year Question Solutions (CA) - 1
Some Important Previous Year Question Solutions (CA) - 1
(Part-1)
(Computer Architecture)
Bootstrap loader
Alternatively referred to as bootstrapping, boot loader, or boot program, a bootstrap loader
is a program that resides in the computers EPROM, ROM, or other non-volatile memory that
automatically executed by the processor when turning on the computer. The bootstrap
loader reads the hard drives boot sector to continue the process of loading the computers
operating system. The term boostrap comes from the old phrase "Pull yourself up by your
bootstraps."
The boot loader has been replaced in computers that have an Extensible Firmware Interface
(EFI). The boot loader is now part of the EFI BIOS.
S Fraction
The distinction between fractions and integers only affects multiplication and
division.
Instructions are fixed size (20 bits), with a single address, stored 2 per word.
8 bits are allocated for the opcode, allowing 256 different operations; only 21 were
implemented.
12 bits are allocated for the address, allowing a memory space of 4096 words; IAS
was built with only 1024 words of memory.
Example: ADD
The above instruction consists of an operation code only. It has no addrss field. The
operation has the effect of popping the two top numbers from the stack, adding the
numbers and pushing the sum into the stack. Here all operands are performed within stack.
To evaluate arithmetic expressions, they must be first converted into reverse polish
notation. The operand at address X is pushed on to the top of the stack. Automatically the
stack pointer is incremented.
Example:
X=(A + B) + (C + D)
PUSH A ; TOS <- A top of the stack
PUSH B ; T0S <- B
ADD ; TOS <- A + B
PUSH C ; TOS <- C
PUSH D ; TOS <- D
ADD ; TOS <- C + D
ADD ; TOS <- (C + D) + (A + B)
POP X ; M [X] <- TOS
For example, the rational number 9÷2 can be converted to single precision float format as
following,
The result said to be normalized, if it is represented with leading 1 bit, i.e. 1.001(2) x 22.
(Similarly when the number 0.000000001101(2) x 23 is normalized, it appears as 1.101(2) x 2-
6
). Omitting this implied 1 on left extreme gives us the mantissa of float number. A
normalized number provides more accuracy than corresponding de-normalized number.
The implied most significant bit can be used to represent even more accurate significand (23
+ 1 = 24 bits) which is called subnormal representation. The floating point numbers are to be
represented in normalized form.
Cycle stealing:
Cycle stealing is a method of accessing RAM without interfering with the CPU. It is similar
to DMA for allowing I/O controllers to read or write RAM without CPU intervention. Clever
exploitation of specific CPU or bus timings could permit the CPU to run at full speed without
any delay if external devices may sneak in one RAM access to memory not actively
participating in the CPU's current activity and complete the operations before any possible
CPU conflict. Such systems are nearly dual-port RAM without the expense of high speed
RAM. Most systems halt the CPU during the steal, essentially making it DMA by any other
name.
Instruction cycle:
We have seen that each phase of the instruction cycle can be decomposed into a sequence
of elementary micro-operations. In our example, there is one sequence each for the fetch,
indirect, and interrupt cycles, and, for the execute cycle, there is one sequence of micro-
operations for each opcode.
To complete the picture, we need to tie sequences of micro-operations together, and this is
done in Figure 2. We assume a new 2-bit register called the instruction cycle code (ICC). The
ICC designates the state of the processor in terms of which portion of the cycle it is in:
00: Fetch
01: Indirect
10: Execute
11: Interrupt
Bus arbitration:
It is a way of sharing the computer's data transferring channels (buses) in an optimal way so
the faster devices won't have to wait to be able to transfer and the slower devices (like
peripherals) will have a chance to transfer as well. Different methods exist but two main
types are the serial and parallel arbitrations. Serials include the daisy chain arbitration and
hardware polling. The parallel ones are software polling and independent requesting .
Centralized bus arbitration requires hardware that will grant the bus to one of the
requesting devices.
SCSI connectors
The below illustrations are examples of some of the most commonly found and used SCSI
connectors on computers and devices and illustrations of each of these connections.
USB:
Universal Serial Bus (USB) is an industry standard developed in the mid-1990s that defines
the cables, connectors and communications protocolsused in a bus for connection,
communication, and power supply between computers and electronic devices.
USB was designed to standardize the connection of computer peripherals (including
keyboards, pointing devices, digital cameras, printers, portable media players, disk
drives and network adapters) to personal computers, both to communicate and to
supply electric power. It has become commonplace on other devices, such
as smartphones, PDAs and video game consoles. USB has effectively replaced a variety of
earlier interfaces, such as serial and parallel ports, as well as separate power chargers for
portable devices.
Further, the stack may also be used for short-term large-scale storage of data when
using recursive functions that store partial data in the stack and call themselves again.
The generic use of stack is for,
1. Return address
2. return value
3. parameters to called function
4. local variables in the called function
5. processor registers that will be reused in the called function
a. How many bits are there in the operation code , the register code part ,
and the address part?
b. Draw the instruction word format and indicate the number of bits in
each part.
c. How many bits are there in the data and address inputs of the memory?
Ans:
Indirect addressing has a pointer to the memory location as the operand in an instruction.
For instance the instruction MOV @R0 00H, when converted to machine language, @R0
becomes whatever is stored in R0, and that is the address used to move 0 to. It can be
whatever is stored in R0.
A computer has 32-bit instructions and 12-bit addresses. If there are 250 two
address instructions, how many one – address instruction can be formulated?