Professional Documents
Culture Documents
Assignment (Chapter1 To Chapter4)
Assignment (Chapter1 To Chapter4)
1) What is Microprocessor?
At the heart of the microprocessor-based computer system is the microprocessor
integrated circuit. The microprocessor, sometimes referred to as the CPU (central
processing unit), is the controlling element in a computer system. The
microprocessor controls memory and I/O through a series of connections called
buses.
2) What are the main tasks of Microprocessor?
The microprocessor performs three main tasks for the computer system:
(1) Data transfer between itself and the memory or I/O systems.
(2) Simple arithmetic and logic operations, and
(3) Program flow via simple decisions. Although these are simple tasks, it is
through them that the microprocessor performs virtually any series of operations
or tasks.
The power of the microprocessor is in its capability to execute billions of millions
of instructions per second from a program or software (group of instructions)
stored in the memory system. This stored program concept has made the
microprocessor and computer system very powerful devices.
3) What is Bus?
Bus: A bus is a common group of wires that interconnect components in a
computer system. The buses that interconnect the sections of a computer system
transfer address, data, and control information between the microprocessor and
its memory and I/O systems.
4) Discuss deferent types of buses?
Address bus: The address bus requests a memory location from the memory or
an I/O location from the I/O devices. If I/O is addressed, the address bus contains
a 16-bit I/O address from 0000H through FFFFH. The 16-bit I/O address, or port
number, selects one of 64K different I/O devices. If memory is addressed, the
address bus contains a memory address, which varies in width with the different
versions of the microprocessor.
Data bus: The data bus transfers information between the microprocessor and its
memory and I/O address space. Data transfers vary in size, from 8 bits wide to 64
bits wide in various members of the Intel microprocessor family. For example, the
8088 has an 8-bit data bus that transfers 8 bits of data at a time. The 8086, 80286,
80386SL, 80386SX, and 80386EX transfer 16 bits of data through their data buses;
the 80386DX, 80486SX, and 80486DX transfer 32 bits of data; and the Pentium
through Core2 microprocessors transfer 64 bits of data.
Control bus: The control bus contains lines that select the memory or I/O and
cause them to perform a read or write operation. In most computer systems,
there are four control bus connections: (memory read control), (memory write
control), (I/O read control), and (I/O write control). Note that the over bar
indicates that the control signal is active-low; that is active when a logic zero
appears on the control line. Note that these control signal names are slightly
different in various versions of the microprocessor. The microprocessor reads the
contents of a memory location by sending the memory an address through the
address bus. Next, it sends the memory read control signal ( ) to cause the
memory to read data.
5) Discuss memory & I/O system with diagram?
The memory structure of all Intel-based personal computers is similar. This
includes the first personal computers based upon the 8088, introduced in 1981 by
IBM, to the most powerful high-speed versions of today, based on the Pentium 4
or Core2. The memory system is divided into three main parts: TPA (transient
program area), system area, and XMS (extended memory system). The type of
microprocessor in your computer determines whether an extended memory
system exists. If the computer is based upon a really old 8086 or 8088 (a PC or
XT), the TPA and systems area exist, but there is no extended memory.
Buses
Memory system Microprocessor I/O system
6) What Was Special about the 8080?
Not only could the 8080 address more memory and execute additional
instructions, but it executed them 10 times faster than the 8008. An addition that
took 20 μs (50,000 instructions per second) on an 8008-based system required
only 2.0 μs (500,000 instructions per second) on an 8080-based system. Also, the
8080 was compatible with TTL (transistor-transistor logic), whereas the 8008 was
not directly compatible. This made interfacing much easier and less expensive.
The 8080 also addressed four times more memory (64K bytes) than the 8008 (l6K
bytes). These improvements are responsible for ushering in the era of the 8080
and the continuing saga of the microprocessor. Incidentally, the first personal
computer, the MITS Altair 8800, was released in 1974. The assembler program for
the Altair 8800 was written by Digital Research Corporation, which once produced
DR-DOS for the personal computer.
Chapter-03
1) List the 8/16/32 bit registers that are used for register addressing?
8-bit=AH, AL, BH, BL, CH, CL, DH, DL
16-bit=AX, BX, CX, DX, SP, BP, DI, SI
32-bit= EAX, EBX, ECX, EDX, ESP, EBP, EDI, ESI
2) List the 64-bit registers available to the 64-bit mode Pentium 4 &
Core2?
In 64-bit mode, a prefix called REX (register extension) is added.
Encoded as a 40H-4FH, follows other prefixes; placed immediately before the
opcode.
Purpose is to modify reg & r/m fields in the second byte of the instruction.
Rex is needed to be able to address registers R8 through R15.
MOV AX, BX
Destination Source
5) What is Register addressing?
Register addressing is the most common form of data addressing and, once the
register names are learned, is the easiest to apply. The microprocessor contains
the following 8-bit register names used with register addressing: AH, AL, BH, BL,
CH, CL, DH, and DL. Also present are the following 16-bit register names: AX, BX,
CX, DX, SP, BP, SI, and DI. In the 80386 and above, the extended 32-bit register
names are: EAX, EBX, ECX, EDX, ESP, EBP, EDI, and ESI. In the 64bit mode of the
Pentium 4, the register names are: RAX, RBX, RCX, RDX, RSP, RBP, RDI, RSI, and R8
through R15. With register addressing, some MOV instructions and the PUSH and
POP instructions also use the 16-bit segment register names (CS, ES, DS, SS, FS,
and GS). It is important for instructions to use registers that are the same size.
To pop a value from the stack the pop instruction is used. These first instruction
shall push the value stored in ax (16-bit register) to the stack. This is done by
subtracting a value of 2 (2 bytes) from sp.
The intrasegment jump is a jump for which the addresses must lie within the
current code segment. It is achieved by only modifying the value of ip.
10) What is the use of push in 8086?
The 80386 PUSH SP instruction pushes the value of SP as the existed before the
instruction. The differs from the 8086 where PUSH SP pushes the new value
(decremented by 2)
Chapter-04
1) What is Machine language?
Machine language is the native binary code that the microprocessor understands
and uses as its instructions to control its operation. Machine language instructions
for the 8086 through the Core2 vary in length from 1 to as many as 13 bytes.
Although machine language appears complex, there is order to this
microprocessor’s machine language. There are well over 100,000 variations of
machine language instructions, meaning that there is no complete list of these
variations. Because of this, some binary bits in a machine language instruction are
given, and the remaining bits are determined for each variation of the instruction.
The opcode selects the operation (addition, subtraction, move, and so on) that is
performed by the microprocessor. The opcode is either 1 or 2 bytes long for most
machine language instructions. Figure 4–2 illustrates the general form of the first
opcode byte of many, but not all, machine language instructions. Here, the first 6
bits of the first byte are the binary opcode. The remaining 2 bits indicate the
direction (D)—not to be confused with the instruction mode bit (16/32) or
direction flag bit (used with string instructions)—of the data flow, and indicate
whether the data are a byte or a word (W). In the 80386 and above, words and
double words are both specified when? The instruction mode and register-size
prefix (66H) determine whether W represents a word or a double word.
3) Briefly discuss Push?
The 8086–80286 PUSH instruction always transfers 2 bytes of data to the stack;
the 80386 and above transfer 2 or 4 bytes, depending on the register or size of
the memory location. The source of the data may be any internal 16- or 32-bit
register, immediate data, any segment register, or any 2 bytes of memory data.
There is also a PUSHA instruction that copies the contents of the internal register
set, except the segment registers, to the stack. The PUSHA (push all) instruction
copies the registers to the stack in the following order: AX, CX, DX, BX, SP, BP, SI,
and DI. The value for SP that is pushed onto the stack is whatever it was before
the PUSHA instruction executed. The PUSHF (push flags) instruction copies the
contents of the flag register to the stack. The PUSHAD and POPAD instructions
push and pop the contents of the 32-bit register set found in the 80386 through
the Pentium 4. The PUSHA and POPA instructions do not function in the 64-bit
mode of operation for the Pentium 4.
Disadvantages
All operation codes have to be remembered.
All memory addresses have to be remembered.
Disadvantages
Like machine language, it is also machine dependent/specific.
Since it is machine dependent, the programmer also needs to understand the
hardware