SAGAR Group of Institution Bhopal Department of Science & Engineering & Interfacing (CS-601)

UNIT -1

Important Question and answers

Q1. What is Microprocessor Explain fundamental block of microprocessor?

Ans : Microprocessor is a computer processor that incorporates the functions of a computer's (CPU) on a single (IC).the microprocessor is a multipurpose, programmable device that accepts digital data as input, processes it according to instructions stored in its memory, and provides results as output. It is an example of sequential digital logic, as it has internal memory. operate on numbers and symbols represented in the binary numeral system.

CU ALU

Register Bank

Architecture of Microprocessor

A) ALU: The arithmetic-logic unit is a combinational network that performs arithmetic and logical Operations on the data. • ALU performs all arithmetic and logic operations on data. • The size of ALU defines the size of the microprocessor. • For example 8086 is a 16-bit microprocessor since its ALU 16-bits wide. is also a 16-bit microprocessor even though its data is 8-bits wide. That is because of its 16-bit ALU • Some 32-bit microprocessors like Motorola 68030 include multiple ALUs for Parallel operations to achieve faster speed.

B) Control Unit: It decodes each instruction and under the supervision of a clock controls the external and Internal units ensuring correct logical operation of the system.

The CU performs basically two tasks: 1.Instruction interpretation: i) CU reads instruction from memory using PC ii) It then recognizes the instruction type, gets necessary operands, and routes then to appropriate functional units of execution unit iii) Necessary signals are issued to perform desired operation iv) Results are routed to the specified destination. 2. Instruction Sequencing: The CU determines the address of the next instruction to be executed and loads it Into PC. The CU is designed using one of the two techniques: i) Hardwired Control Designed by physically connecting typical components such as gated and flipflops. For example, ’s 16-bit Z8000 ii) Microprogramming This type of CUs include a control ROM for translating the instructions. Intel’s 8086 is a microprogrammed microprocessor

B) Register Bank: A number of registers are normally included in the microprocessor. These are used for temporary storage of data, instructions and addresses during execution of a program.

Q.2 what is the difference between RISC and CISC Architecture. Ans RISC (Reduced Instruction Set Computing) and CISC (Complex Instruction Set Computing) are two computer architectures that are predominantly used nowadays. The main difference between RISC and CISC is in the number of computing cycles each of their instructions take. With CISC, each instruction may utilize a much greater number of cycles before completion than in RISC. The reason behind the difference in number of cycles utilized is the complexity and goal of their instructions. In RISC, each instruction is only meant to achieve a very small task. So if you want a complex task done, then you need a lot of these instructions strung together. With CISC, each instruction is similar to a high level language code. You only need a few instructions to get what you want as each instruction does a lot.

In terms of the list of available instructions, RISC has the longer one over CISC. This is because each small step may need a separate instruction, unlike in CISC where a single instruction would already cover multiple steps. Although CISC may be easier for programmers, it also has its downside. Using CISC may not be as efficient as when you use RISC. This is because inefficiencies in the CISC code will then be used again and again, leading to wasted cycles. Using RISC allows the programmer to remove unnecessary code and prevent wasting cycles.

1. CISC instructions utilize more cycles than RISC 2. CISC has way more complex instructions than RISC 3. CISC typically has fewer instructions than RISC 4. CISC implementations tend to be slower than RISC implementations 5. typically use CISC while tablets, smart phones and other devices use RISC

Q.3 What is the difference between microprocessor and ? Ans : Microprocessor: Microprocessor is a simple central processing unit (CPU) on a single chip. It includes Arithmetic logic unit (ALU), control unit (CU), registers, instruction decoders, bus control circuit etc. but everything should be on a single chip.

Microcomputer: A microcomputer is the association of microprocessor and the peripheral I/O devices, support circuitry and memory (both data and program). It is not necessary to be on a single chip. So we can say that: 1. Microprocessor is one component of the microcomputer. 2. Microcomputer is a complete computer similar to any other computer. 3. The term peripheral is used for input/output devices.

Q.4 Define bit, , word and instruction.

Ans : Bit = Binary digit = 0 or 1

Byte = a sequence of 8 bits = 00000000, 00000001, ..., or 11111111

Word = a sequence of N bits where N = 16, 32, 64 depending on the computer Instruction: An instruction is an order given to a computer processor by a computer program. At the lowest level, each instruction is a sequence of 0s and 1s that describes a physical operation the computer is to perform (such as "Add") and, depending on the particular instruction type, the specification of special storage areas called registers that may contain data to be used in carrying out the instruction, or the location in computer memory of data.

Q.1 Explain purpose of Registers. Also explain different types of register and their work.

Ans: A number of registers are normally included in the microprocessor. These are used for temporary storage of data, instructions and addresses during execution of a program. Different types of register are (i) (Acc) or Result Register: This is an 8-bit register used in various arithmetic and logical operations. Out of the two operands to be operated upon, one comes from accumulator (Acc), whilst the other one may be in another internal register or may be brought in by the data bus from the main memory. Upon completion of the arithmetic/logical operation, the result is placed in the accumulator (replacing the earlier operand). Because of the later function, this register is also called as result register. (ii) General Purpose Registers or Scratch Pad Memory There are six general purpose 8-bit registers that can be used by the programmer for a variety of purposes. These registers, labelled as B, C, D, E, H and L, can be used individually (e.g., when operation on 8-bit data is desired) or in pairs (e.g., when a 16-bit address is to be stored). Only B-C, D-E and H-L pairs are allowed. in case of 8086 All the general purpose registers are 16 bit in size ,8086 general purpose registers are AX,BX,CX,DX.

(iii) Instruction Register (IR) This 8-bit register stores the next instruction to be executed. At the proper time this stored word (instruction) is fed to an instruction decoder which decodes it and supplied appropriate signals to the control unit. When the execution has been accomplished the new word in the instruction register is processed. (iv) (PC) This is a 16-bit register which holds the address of the next instruction that has to be fetched from the main memory and loaded into the instruction register. The program controlling the operation is stored in the main memory and instructions are retrieved from this memory normally in order. Therefore, normally the address contained in the PC is incremented after each instruction is fetched. However, certain classes of instruction can modify the PC so that the programmer can provide for branching away from the normal program flow. Examples are instructions in the “jump” and ‘call subroutine’ groups. (v) Stack Pointer (SP) This is also a 16-bit register and is used by the programmer to maintain a stack in the memory while using subroutines. (vi) or Condition Flags A status register consisting of a few flip-flops, called as condition flags (in 8085 the number of flags is five) is used to provide indication of certain conditions that arise during arithmetic and logical operations.

Q.5 Explain the evolution of Microprocessor and its application.

Ans. Evolution of Microprocessor: The first microprocessor was introduced in the year 1971. It was introduced by Intel and was named .Intel 4004 is a 4 bit microprocessor and it was not a powerful microprocessor. It can perform addition and subtraction operation on 4 bits at a time.

However it was Intel’s 8080 was the first microprocessor to make it to Home computers. It was introduced during the year 1974 and it can perform 8 bit operations. Then during the year 1976, Intel introduced 8085 processors which is nothing but an update of 8080 processors.8080 processors are updated by adding two Enable/Disable Instructions, Three added interrupt pins and serial I/O pins. Intel introduced 8086 pins during the year 1976. The major difference between 8085 and 8086 processor is that 8085 is an 8 bit processor, but 8086 processor is a 16 bit processor. The greatest advantage of the above processors are that it do not contain Floating point instructions. Here floating point refers to the radix point or decimal point. For example: 123.456 is a floating point representation. Processors