2

Computer Organization and Architecture

1. What do you understand by central processing unit? Describe its various units in detail.

Ans.: The central processing unit (CPU) is referred to as the brain of a computer system as it converts data (input) into meaningful information (output). It is a highly complex, extensive set of electronic circuitry, which executes stored program instructions. It controls all the internal and external devices, performs arithmetic and logic operations, and operates only on binary data, that is, data composed of 0’s and 1’s. In addition, it also controls the usage of the main memory to store data and instructions and controls the sequence of operations. Thus, functions of a processor can be summed up as follows:

images It carries out arithmetic and logic functions.
images It controls the use of main storage (memory) to store data and instructions.
images It controls the sequence of operations.
images It controls all the parts of the computer system.

As shown in Figure 2.1, the CPU consists of three main subsystems: arithmetic and logic unit (ALU), control unit (CU), and registers. These are described as follows:

  1. Arithmetic and logic unit (ALU): It contains the electronic circuitry that executes all arithmetic and logical operations on the data made available to it. The data required to perform the arithmetic and logical functions are inputs from the designated registers. It comprises of the following two units:

    a. Arithmetic unit (AU): It contains the circuitry that is responsible for performing the actual computing and carrying out the arithmetic calculations, such as addition, subtraction, multiplication, and division. It can perform these operations at a very high speed.

    b. Logic unit (LU): It enables the CPU to make logical operations based on the instructions provided to it. These operations are logical comparison between data items. It can compare numbers, letters, or special characters and can then take action based on the result of the comparison. Logical operations of LU test for three conditions: equal-to condition, less-than condition, and greater-than condition. In a test for equal-to condition, the ALU compares two values to determine if they are equal. For example, if the number of tickets sold equals the number of seats in a cinema hall, then housefull is declared. To test less-than condition, the ALU compares values to determine if one is less than another. For example, if a person purchases less than two tickets, then no discount rate is given. In a test for greater-than condition, the ALU determines if one value is greater than another. For example, if a person purchases greater than two tickets, then the discount rate is 5%.

  2. Control unit (CU): It contains circuitry that uses electrical signals to direct the entire computer system to carry out or execute stored program instructions. This resembles orchestra leader who himself does not play a musical instrument but directs other people to play the musical instrument in a harmonized manner. It also does not execute program instructions rather it directs other parts of the system to do so by communicating with both the ALU and the memory. It controls the input/output (I/O) devices and transfer of data to and from the primary storage. An analogy can be considered between the CU and the traffic police. The CU decides which action will occur just as the traffic police takes decisions on which lanes traffic will move or stop. It also determines what data are needed, where it is stored, and where to store the results of the operation as well as sends the control signals to the devices involved in the execution of the instructions. It administers the movement of large amount of instructions and data used by the computer. In order to maintain the proper sequence of events required for any processing task, the CU uses clock inputs.
  3. Registers: These are special-purpose, high-speed temporary memory units. These are temporary storage areas for holding various types of information such as data, instructions, addresses, and the intermediate results of calculations. Essentially, they hold the information that the CPU is currently working on. They can be thought of as CPU's working memory, a special additional storage location that offers the advantage of speed. They work under the direction of the CU to accept, hold, and transfer instructions or data and perform arithmetic or logical comparisons at high speed. The CU uses a data storage register in the similar way a store owner uses a cash register as a temporary, convenient place to store the transactions. As soon as a particular instruction or piece of data is processed, the next instruction immediately replaces it, and the information that results from the processing is returned to the main memory. Table 2.1 lists some of the important registers used in the CPU.

images

Figure 2.1 Central Processing Unit

Table 2.1 Registers and Functions

Register Name

Function

Program counter (PC)

It keeps track of the next instruction to be executed.

Instruction register (IR)

It holds the instruction to be decoded by the CU.

Memory address register (MAR)

It holds the address of the next location in memory to be accessed.

Memory buffer register (MBR)

It is used for storing data either coming to the CPU or data being transferred by the CPU.

Accumulator (ACC)

It is a general-purpose register used for storing temporary results and results produced by the ALU.

Data register (DR)

It is used for storing the operands and other data.

2. Distinguish between CPU and ALU.

Ans.: The ALU contains the electronic circuitry that executes all arithmetic and logical operations on the data made available to it by the CPU. Hence, it can be said that the ALU is part of the CPU. On the other hand, the CPU fetches an instruction from random access memory (RAM), decodes it, sends the desired bytes to the ALU, and also tells it which operation to perform on them. Therefore, the ALU can be thought of as the brain of the CPU, and the CPU as the brain of the computer.

3. Registers based CPU can be viewed as multiple accumulators based CPU. Justify this statement.

Ans.: In registers based CPU, multiple registers are used as accumulator. In other words, there are multiple accumulators. So, one must say that registers based CPU can be viewed as multiple accumulators based CPU. Such a CPU has a general-purpose registers organization. Thus, this type of organization results in higher CPU efficiency. However, the use of registers in the CPU results in short programs with limited instructions.

4. Write a short note on main memory unit.

Ans.: The memory is that part of the computer that holds data and instructions for processing. Logically, it is an integral component of the CPU but physically, it is a separate part placed on the computer's motherboard. It stores program instructions or data for only as long as the program they pertain to is in operation. The CPU accesses the main memory in random manner, that is, the CPU can access any location of this memory to either read information from it or store information in it. The primary memory is of two types: random access memory (RAM) and read only memory (ROM).

RAM directly provides the required information to the processor. It can be defined as a block of sequential memory locations, each of which has a unique address determining the location and those locations contain a data element. Storage locations in the main memory are addressed directly by the CPU's instructions. It is volatile in nature, which means the information stored in it remains as long as the power is switched on. As soon as the power is switched off, the information contained in the RAM is lost.

ROM stores the initial start-up instructions and routines in basic input/output system (BIOS), which can only be read by the CPU, each time it is switched on. The contents of ROM are not lost even in case of a sudden power failure, thus making it non-volatile in nature. The instructions in the ROM are built into the electronic circuits of the chip, called firmware. It is also random access in nature, which means the CPU can randomly access any location within the ROM. Improvement in technology for constructing flexible ROM comes in various types: PROM (programmable read only memory), EPROM (erasable programmable read only memory), and EEPROM (electrically erasable programmable read only memory).

5. What are the uses or advantages of cache memory? Discuss with the help of an example.

Ans.: The cache is a very high speed, expensive piece of memory, which is used to speed up the memory retrieval process. Without it, every request from the CPU to access data would be sent to the main memory, which in response sends the data back to the CPU through the system bus. This is a slow process in computing terms, so to overcome this problem the cache memory has been introduced. This extremely fast memory would store data that are frequently accessed. This is to achieve the quickest possible response time to the CPU. A cache is a piece of very fast memory, made from high-speed static RAM that reduces the access time of the data. It is very expensive and generally incorporated in the processor, where valuable data and program segments are kept.

Consider an example of library system. When a person comes into the library and asks for a book, the librarian searches for the requested book in the bookshelves, retrieves the book, and delivers it to the person. After the person reads the book, it is returned to the library. At the same time, if any other person comes in requesting the same book, which is still placed on the librarian's desk, the librarian does not have to go through the process of searching the book in the bookshelves. This results in saving of precious time in retrieving the requested book, and thus improving the efficiency of the work. This analogy can be related to computer's cache system. The computer uses logic to determine which data are the most frequently accessed and keeps them in the cache.

6. Discuss different types of cache.

Ans.: A cache is a piece of very fast memory, made from high-speed static RAM that reduces the access time of the data. It is very expensive and is generally incorporated in the processor, where valuable data and program segments are kept. The cache memory can be categorized into the following three levels:

  1. L1 cache: This cache is closest to the processor and hence is termed as primary or L1 cache. Each time the processor requests information from the memory, the cache controller on the chip uses special circuitry to first check if the requested data are already in the cache. If it is present, then the system is spared from time-consuming access to the main memory. In a typical CPU, the primary cache ranges in size from 8 to 64 KB, with larger amounts on the newer processors. This type of cache memory is very fast because it runs at the speed of the processor since it is integrated into it.
  2. L2 cache: This cache is larger but slower in speed than L1 cache. It is used to see recent accesses that is not picked by L1 cache and is usually from 64 KB to 2 MB in size. It is also found on the CPU. If L1 and L2 caches are used together, then the missing information that is not present in the L1 cache can be retrieved quickly from the L2 cache.
  3. L3 cache: This cache memory is an enhanced form of the memory present on the motherboard of the computer. It is an extra cache built into the motherboard between the processor and the main memory to speed up the processing operations. It reduces the time gap between request and retrieval of the data and instructions thereby accessing data much more quickly than the main memory. It is being used with processors nowadays having more than 3 MB of storage in it.

7. What are the roles of different buses of computers?

Ans.: A bus is a set of connections between two or more components/devices, which are designed to transfer several/all bits of a word from source to destination. It is a shared media of information transfer. It consists of multiple paths, which are also termed as lines and each line is capable of transferring one bit at a time (Figure 2.2). These lines are broadly categorized into the following three functional groups:

  1. Data lines: These lines provide a path for moving data between the system modules. They are collectively known as data bus. Data bus width limits the maximum number of bits, which can be transferred simultaneously between two modules. The width of data bus helps in determining the overall performance of a computer system.
  2. Address lines: These lines are used to designate the source of data for data bus. As the memory may be divided into linear array of bytes or words, for reading or writing any information on to the memory, the CPU needs to specify the address of a particular location. This address is supplied by the address bus. Thus, the width of address bus specifies the maximum possible memory supported by a system. For example, if a system has 16-bit wide address bus, it can support memory size of equal to 216 (or 65536) bytes.
  3. Control lines: These lines are used to control the access to the data bus and the address bus. The control lines are collectively called control bus. These lines are used for transmission of commands and timing signals (which validate data and address) between the system modules.

images

Figure 2.2 System Bus

8. What are the steps required to transfer data from the memory to the processor and what are the steps required to write data into the memory? Explain.

Ans.: The whole process of communication between the processor and the memory can be divided into two steps: information (data) transfer from the memory to the processor and writing information (data) into the memory. The steps required to transfer data from the memory to the processor are as follows (Figure 2.3):

  1. The processor places the address in memory address register (MAR) through the address bus.
  2. The processor issues a READ command through the control bus.
  3. The memory places required data on the data bus, which is then transferred to the processor.

Based on the read time of the memory, a specific number of processor clock intervals are allotted for the completion of this operation. During this interval, the processor is forced to wait. Similarly, the sequence of events that takes place when information is written into the memory is as follows:

  1. The processor places the address in the MAR through the address bus.
  2. The processor places the data to be written in the memory on the data bus.
  3. The processor issues a WRITE command to the memory through the control bus.
  4. The data are written in the memory at the address specified in the MAR.

images

Figure 2.3 Processor Memory Communication

9. Why instruction format is needed? What are the issues in designing of an instruction format?

Ans.: An instruction consists of an opcode and one or more operands, which may be addressed implicitly or explicitly. To define the layout of the bits allocated to these elements of instructions, an instruction format is used. It also indicates (implicitly or explicitly) the addressing mode used for each operand in that instruction. Figure 2.4 illustrates the format of an instruction for the processor. The first three bits represent the opcode and last six bits represent the operand. The middle bit specifies whether the operand is a memory address or a number. When the bit is set to 1, the operand represents a number. The issues in designing an instruction format are as follows:

images Instruction length: The core designing issue involved in the instruction format is the designing of instruction length. The instruction length determines the flexibility of the machine. The decision on the length of the instruction depends on memory size, memory organization, and memory transfer length. There exists a trade-off between a desire of having powerful instruction range and need of saving space.
images Allocation of bits: For the given instruction length, there is a trade-off between the number of opcodes and the power of the addressing capability. More opcode means more bits in the opcode field, also for an instruction format of a given length, which reduces the number of bits available for addressing.

images

Figure 2.4 Instruction Format

10. Define instruction cycle. With the help of diagrams explain fetch and execution cycles.

Ans.: The processing needed for a single instruction (fetch and execution) is referred to as instruction cycle. Instruction processing consists of two cycles: fetch cycle and execute cycle, as shown in Figure 2.5. The CPU fetches (reads) instructions from the memory, one at a time, and performs the operation specified by this instruction. Instruction fetch involves reading an instruction from a memory location to the CPU and executing this instruction may involve several operations depending on the nature of instruction.

images

Figure 2.5 Two-step Instruction Cycle

Fetch Cycle

In the beginning, the address, which is stored in the program counter (PC), is transferred to the MAR. The CPU then transfers the instruction located at the address stored in the MAR to the memory buffer register (MBR) through the data lines connecting the CPU to the memory. This transfer from the memory to the CPU is coordinated by the CU. To finish the cycle, newly fetched instruction is transferred to the instruction register (IR) and unless instructed otherwise, the CU increments the PC to point to the next address location in the memory.

Figure 2.6 illustrates the fetch cycle, which can be summarized as follows:

  1. PC images MAR
  2. MAR images Memory images MBR
  3. MBR images IR
  4. CU increments PC

images

Figure 2.6 Fetch Cycle: CPU, Central Processing Unit; PC, Program Counter; MAR, Memory Address Register; MBR, Memory Buffer Register; CU, Control Unit; and IR, Instruction Register

After the CPU has finished fetching an instruction, the CU checks contents of the IR and determines which type of execution is to be carried out next. This process is known as the decoding phase. The instruction is now ready for the execution cycle.

Execute Cycle

Once an instruction has been loaded into the IR and the CU has examined and decoded the fetched instruction and determined the required course of action to take, the execution cycle can commence. The actions within the execution cycle can be categorized into the following four groups:

  1. CPU to memory: Data may be transferred from the memory to the CPU and vice versa.
  2. CPU to I/O: Data may be transferred from an I/O module to the CPU and vice versa.
  3. Data processing: The CPU may perform some arithmetic or logic operation on data via the ALU.
  4. Control: An instruction may specify that the sequence of operation may be altered. For example, the PC may be updated with a new memory address to reflect that the next instruction fetched should be read from this new location.

images

Figure 2.7 Execute Cycle: CPU, Central Processing Unit; IR, Instruction Register; MAR, Memory Address Register; MBR, Memory Buffer Register; CU, Control Unit; and ACC, Accumulator

The example [LOAD ACC, memory] deals with one operation that can occur, as illustrated in Figure 2.7. The example [LOAD ACC, memory] can be classified as memory reference instruction. Instructions that can be executed without leaving the CPU are referred to as non-memory reference instructions. This operation loads the accumulator with data that are stored in the memory location specified in the instruction. The operation starts by transferring the address portion of the instruction from the IR to the MAR. The CPU then transfers the instruction located at the address stored in the MAR to the MBR via the data lines connecting the CPU to the memory. This transfer from the memory to the CPU is coordinated by the CU. To finish the cycle, the newly fetched data are transferred to ACC.

The illustrated LOAD operation (see Figure 2.7) can be summarized as follows:

  1. IR [address portion] images MAR
  2. MAR images Memory images MBR
  3. MBR images ACC

After the execution cycle completes, the next instruction is fetched and the process starts again.

11. Write in detail on CISC and RISC architectures.

Ans.: Processors are built with the ability to execute a limited set of basic operations. The collections of these operations are known as the instruction set of processor. An instruction set is necessary so that a user can create machine language programs to perform any logical and/or mathematical operations. Thus, the design of the instruction set for the processor becomes an important aspect of computer architecture. Based upon the instruction sets, there are two common types of architectures: complex instruction set computer (CISC) and reduced instruction set computer (RISC).

CISC Architecture

Earlier, programming was done in low-level languages such as machine language and assembly language. These languages were executed very quickly on computers, but were not easy for programmers to understand and code. To overcome these shortcomings and make programming more accessible to the masses, high-level languages were developed. However, instructions in high-level languages were required to be converted into their equivalent low-level languages before the processor can execute them. This conversion process was performed by the compiler. Writing compilers for such high-level languages became increasingly difficult. To make compiler development easier, CISC was developed. The sole motive of manufacturers of CISC-based processor was to manufacture processors with more extensive and complex instruction set. It shifted most of the burden of generating machine instructions to the processor. For example, instead of making a compiler to write long machine instructions for calculating a square root, a CISC processor would incorporate a hardwired circuitry for performing the square root in a single step. Writing instructions for a CISC processor is comparatively easy because a single instruction is sufficient to utilize the built-in ability. In fact, the first PC microprocessors were CISC processors because all the instructions that the processor could execute were built into the processors. As memory was expensive in the early days of computers, CISC processors saved memory because their instructions could be fed directly into the processor. Most of the PCs today include a CISC processor.

RISC Architecture

RISC is a processor architecture that utilizes a small, highly optimized set of instructions. The concept behind RISC architecture is that a small number of instructions are faster in execution as compared to a single long instruction. To implement this, it simplifies the instruction set of the processor, which helps in reducing the execution time. The optimization of each instruction in the processor is done through a technique known as pipelining. Pipelining allows the processor to work on different steps of the instruction at the same time; using this technique, more instructions can be executed in a shorter time. This is achieved by overlapping the fetch, decode, and execute cycles of two or more instructions. To prevent more interactions with the memory or to reduce the access time, the RISC design incorporates a larger number of registers. As each instruction is executed directly using the processor, no hardwired circuitry (used for complex instructions) is required. This allows RISC processors to be smaller, consume less power, and run cooler than CISC processors. Due to these advantages, RISC processors are ideal for embedded applications such as mobile phones, PDAs, and digital cameras. In addition, the simple design of a RISC processor reduces its development time as compared to a CISC processor.

12. List some merits and demerits of CISC architecture.

Ans.: The merits of CISC architecture are as follows:

images At the time of its initial development, CISC machines used available technologies to optimize the computer performance.
images It uses general-purpose hardware to carry out commands. Therefore, new command can be added into the chip without changing the structure of the instruction set.
images Microprogramming is as easy as assembly language to implement and much less expensive than hardwiring a CU.
images As each instruction became more capable, fewer instructions could be used to implement a given task. This makes efficient use of the relatively slow main memory.
images As microprogram instruction sets can be written to match the constructs of high-level languages, the compiler does not have to be very complex.

Although the CISC architecture did much to improve computer performance, it still had some demerits. They are as follows:

images Processors of early generation of computers were contained as a subset in succeeding version, so the instruction set and the chip hardware became complex with each generation of computers.
images Different instructions take different amount of clock time to execute, and thus slow down the overall performance of the machine.
images It requires continuous reprogramming of on-chip hardware. Its design includes the complexity of hardware needed to perform many functions and the complexity of on-chip software needed to make the hardware do the right thing.

13. What are the advantages and disadvantages of using RISC architecture?

Ans.: The advantages of RISC architecture are as follows:

images A simplified instruction set allows for a pipelined, super-scalar design RISC processor to often achieve 2–4 times the performance of CISC processor using a comparable semiconductor technology and the same clock rates.
images As the instruction set of a RISC processor is simple, it uses less chip space. Extra functions such as memory management units or floating point AUs can also be placed on the same chip.
images Since RISC architecture is simpler than CISC architecture, it can be designed more quickly, and can take advantage of the other technological developments faster than corresponding CISC designs, leading to greater leaps in the performance between generations.

But, on the other hand RISC got few disadvantages also. They are as follows:

images The performance of a RISC processor depends largely on the code that it is executing. If the compiler does a poor job of instruction scheduling, the processor can spend time waiting for the result of one instruction before it can proceed with the subsequent instruction.
images Instruction scheduling makes the debugging process difficult. If scheduling (and other optimizations) is turned off, the machine-language instructions show a clear connection with their corresponding lines of source.
images RISC machines require very fast memory systems to feed instructions. RISC-based systems typically contain large memory cache usually on the chip itself.

14. Which part of the computer is the most important? Give its brief introduction.

Ans.: Motherboard is the most important part of a computer system (also known as system board). It is a large multilayered printed circuit board inside a computer. The motherboard contains the CPU, the BIOS ROM chip, and the CMOS (complementary metal oxide silicon) setup information. It has expansion slots for installing different adapter cards like video card, sound card, network interface card, and modem. This circuit board provides a connector for the keyboard as well as housing to the keyboard controller chip. It possesses RAM slots for the system's random access memory chips and provides the system's chipset, controllers, and underlying circuitry (bus system) to tie everything together. In a typical motherboard, the circuitry is imprinted on the surface of a firm planar surface and is usually manufactured in a single piece. The most common design of the motherboard in today's desktop computers is the ATX (Advanced Technology eXtended) design. In ATX designs, the computer components included are processor, coprocessors (optionally), memory, BIOS, expansion slot, and interconnecting circuitry. Additional components can be added to a motherboard through its expansion slot. Though, there is cost benefit to this approach, the biggest downside is the restriction of future upgrade options.

15. What is CMOS memory? What is its use?

Ans.: The motherboard includes a separate block of memory called CMOS (complementary metal oxide silicon) chip that consumes very low power. This chip is kept alive by a battery even when the PCs power is off. The function of CMOS chip is to store basic information about the PCs configuration (e.g., type of hard disk and floppy drives, memory capacity, etc.). The other important data, which are kept in the CMOS memory, are system time and date. The clock, CMOS chip, and batteries are usually all integrated into a single chip.

16. What does the configuration of a PC include?

Ans.: The way a system is setup, or the assortment of components that makes up the system, is termed as the configuration of a PC. The configuration can refer to either hardware or software, or both. The typical computer configuration includes RAM (latest is 3 GB and minimal is 512 MB), hard disk (latest is 500 GB and minimal is 160 GB), modem, DVD writer, LCD monitor, Windows operating system (latest versions are 2007, Vista), processor (earlier was Intel dual core and latest is Intel core 2 Quad), motherboard, keyboard, and optical mouse.

17. What are the different types of ports and interfaces associated with the computer?

Ans.: Ports and interfaces are generic names for the various holes (and their associated electronics) found at the back of the computer, using which external devices are connected to the computer's motherboard. Different interfaces and ports run at varying speeds and work best with specific types of devices. The different types of ports used in computers are as follows:

images PS/2 port: It is a standard serial port connector used to plug the computer mouse and keyboards into the PC. It consists of 6 pins in small, round shape socket.
images Serial port: It is a general-purpose communications port, through which data are passed serially, that is, one bit at a time. It is used for transmitting data over long distances. In the past, most digital cameras were connected to a computer's serial port in order to transfer images to the computer.
images Parallel port: It is an interface on a computer that supports the transmission of multiple bits of data (usually 8 bits) at the same time. This port transmits data faster than a serial port and is exclusively used for connecting peripherals such as printers and CD-ROM drives.
images Small Computer System Interface (SCSI) port: It is used in transmitting data up to 7 devices in a daisy chain fashion and at a speed faster than serial and parallel ports (usually 32 bits at a time). It is a hardware interface, which includes an expansion board that plugs into the computer called a SCSI host adapter or SCSI controller. Devices that can be connected to SCSI ports are hard-disk drives and network adapters.
images Universal serial bus (USB) port: It is a plug-and-play hardware interface for connecting peripherals such as keyboard, mouse, joystick, scanner, printer, and modem. It supports a maximum bandwidth of 12 MB/s and has the capability to connect up to 127 devices. With USB port, a new device can be added to the computer without adding an adapter card. It is the replacement for parallel and serial ports.

18. Write in brief on expansion card.

Ans.: An expansion card, also called an adapter card, is a circuit board that provides additional capabilities to the computer system. It is made up of large-scale integrated circuit components installed on it. It is plugged into the expansion socket present on the computer's motherboard to provide the computer an added functionality. Common available expansion cards connect monitors (for enhanced graphics) and microphone (for sound), each having a special purpose to perform. Nowadays, most of the adapters come inbuilt on the motherboard and no expansion card is required unless the need for high performance is required. Different types of expansion cards are as follows:

images Sound card: An expansion card that allows the computer to output sound through connected speakers, to record sounds from a microphone, and to manipulate sounds stored on the computer is called a sound card.
images Video card: It is also called as display adapter. It is used for enhancing graphics images that are seen on the computer's monitor. It converts the images created in the computer to electronic signals required by the monitor.
images Network interface card: It is a computer circuit board that is installed in a computer so that it can be connected to other computers in a network.
images Modem: It is an expansion card that allows two computers to communicate over ordinary phone lines. It converts digital data from computers into analog data, transmits over the telephone lines, and also converts incoming analog signals back to digital signals for the receiving computer.
images PC card: It is a removable device, approximately the size of a credit card, which is designed to plug into a PCMCIA slot. It is a standard, formulated by the Personal Computer Memory Card International Association (PCMCIA) for providing expansion capabilities to computers. The PCMCIA standard supports I/O devices, memory, fax/modem, SCSI, and networking products. It fits into a notebook or laptop.

19. List some factors that should be kept in mind while choosing a processor of a computer system.

Ans.: As processor holds the key for carrying out all the processing and computational work, so every work that is done by the user on the computer is performed either directly or indirectly by the processor. Therefore, the factors that should be considered while choosing a processor of a computer system are as follows:

images Performance: The processor's capabilities dictate maximum performance of a system. It is the most important single determinant of system performance (in terms of speed and accuracy) in the computer.
images Speed: The speed of the processor defines how fast it can perform operations. There are many ways to indicate speed, but the most obvious way to measure is through the internal clock speed of the CPU. The faster the speed of the internal clock of the processor, the faster the CPU will work.
images Software support: New and faster processors support resource-consuming software in a better manner. For example, new processors such as the Pentium 4 enable the use of specialized software, which were not supported on earlier machines.
images Reliability and stability: The reliability of the computer system directly depends on the type and quality of the processor.
images Energy consumption and cooling: Although processors consume relatively less power compared to other system devices, newer processor consumes a great deal of power resulting in the impact on everything from cooling methods selection to overall system reliability.
images Motherboard support: The type of processor used in the system is a major determining factor of the chipset used on the motherboard. The motherboard, in turn, dictates many facets of the system's capabilities and performance.

20. Write in brief on positional and non-positional number systems.

Ans.: In ancient times, people used to count with their fingers. When fingers became insufficient for counting, stones and pebbles were used to indicate the values. This method of counting is called the non-positional number system. It was very difficult to perform arithmetic with such a number system, as it had no symbol for zero. The most common non-positional number system is the Roman number system. In this number system, only a few characters are used to represent the numbers.

On the other hand, a positional number system is any system that requires a finite number of symbols/digits of the system to represent arbitrarily large numbers. When using this system, the execution of numerical calculations becomes simplified because a finite set of digits are used. The value of each digit in a number is defined not only by the symbol, but also by the symbol's position. The most popular positional number system being used today is the decimal number system.

21. What information is conveyed by radix in the number system? Tabulate the types of number system used by the computer.

Ans.: In the number system, the radix (also called base) tells the number of symbols used in the system. In the earlier days, different civilizations were using different radixes. The Egyptians used the radix 2, the Babylonians used the radix 60, and Mayans used 18 and 20. In contrast, modern computers use the radix 2 because they recognize only two symbols, which are represented in digital circuits as 0’s and 1’s. Radix of the system is always expressed in decimal numbers. The base or radix of the decimal system is 10. This implies that there are 10 symbols: 0, 1, 2, 3, 4, 5, 6, 7, 8, and 9. Similarly, the system using three symbols 0, 1, and 2 will be of base 3; four symbols will be of base 4; and so forth.

The base of a number system is indicated by a subscript (decimal number) and this will be followed by the value of the number.

For example,

(7592)10 is of base 10 number system.

(214)8 is of base 8 number system.

(123)16 is of base 16 number system.

The types of number system used by the computer are listed in Table 2.2.

Table 2.2 Types of Number System

images

22. Discuss binary number system.

Ans.: The digital computer provides accurate solutions to problems by performing arithmetic computations. The numbers are not expressed as decimal numbers within the computer because it is not suitable for machine processes. Computer is not only powered by electricity, but also computes with electricity. It shifts voltage pulses around internally. When numbers are represented in the computer's memory by means of small electrical circuits, a number system with only two symbols is used. These symbols are ON or OFF states of the circuit. This system of representing numbers is known as the binary number system. Computer circuit is made up of transistors that have only two states: ON and OFF. ON is interpreted as 1, while OFF as 0. Similar to the decimal system, the position of a digit in a number indicates its value. Instead of ones, tens, hundreds, thousands, etc., as in the decimal system, the columns in the binary system contains ones, twos, fours, eights, etc. Each column represents a number in powers of 2; starting with 2° for the left most column, power is incremented by 1 for each additional column to the right.

23. List the different symbols of hexadecimal number system.

Ans.: Hexadecimal number system uses 0 to 9 and A to F to represent a number, where A is equivalent to decimal 10 and the largest hexadecimal digit F is equivalent to decimal 15. The base for hexadecimal number is 16. The different symbols used in hexadecimal number system are described in Table 2.3.

Table 2.3 Symbols Used in Hexadecimal Number System

Decimal

Hexadecimal

0

0

1

1

2

2

3

3

4

4

5

5

6

6

7

7

8

8

9

9

10

A

11

B

12

C

13

D

14

E

15

F

24. With an appropriate example, explain the conversion of the following:

(a) Decimal to binary and vice versa

(b) Binary to octal and vice versa

(c) Binary to hexadecimal and vice versa

(d) Octal to hexadecimal and vice versa

Ans.: (a) Conversion of Decimal to Binary

The steps for converting a decimal number into binary are as follows:

  1. Begin by dividing the decimal number by 2 (the base of binary number system).
  2. Note the remainder separately as the rightmost digit of the binary equivalent.
  3. Continually repeat the process of dividing by 2 until the quotient is zero and keep writing the remainders after each step of division (these remainders will either be 1 or 0).
  4. Finally, when no more division can occur, write down the remainders in reverse order (last remainder written first).

For example: To determine the binary equivalent of (36)10, we divide the decimal number by 2 shown as follows:

images

Taking remainders in reverse order, we have 100100. Thus, the binary equivalent of (36)10 is (100100)2.

Conversion of Binary to Decimal

In the binary to decimal conversion, each digit of the binary number is multiplied by its weighted position, and each of the weighted values is added together to get the decimal number.

For example: The decimal equivalent of (11010)2 is shown in Table 2.4.

Table 2.4 Decimal Equivalent of (11010)2

images

images

Thus, the decimal equivalent of (11010)2 is (26)10.

(b) Conversion of Binary to Octal

The steps for converting an integer binary number to octal are as follows:

  1. Break the binary number into 3-bit sections starting from the LSB to the MSB.
  2. Convert the 3-bit binary number to its octal equivalent.

For whole numbers, it may be necessary to add a zero as the MSB in order to complete a grouping of 3 bits.

For example: To determine the octal equivalent of (010111)2, we first break 010111 from right-hand side (RHS) into 3-bit section as 010 (MSB) and 111 (LSB).

Now, binary number 010 (MSB) is equivalent to octal number 2 and binary number 111 (LSB) is equivalent to octal number 7.

Thus, the octal equivalent of (010111)2 is (27)8.

Conversion of Octal to Binary

The steps for converting an octal number to binary are as follows:

  1. Convert the decimal number to its 3-bit binary equivalent.
  2. Combine the 3-bit sections by removing the spaces to get the binary number.

For example: To determine the binary equivalent of (231)8, we first write the binary-coded value of the octal number 231 from LHS. That is, octal number 2 has binary value 010, octal number 3 has binary value 011, and octal number 1 has binary value 001.

Octal Number = 2 3 1
Binary-coded Value = 010 011 001

Combining the 3 bits of the binary-coded values, we have 010011001.

Thus, the binary equivalent of (231)8 is (010011001)2.

(c) Conversion of Binary to Hexadecimal

The steps for converting a binary number to hexadecimal are as follows:

  1. Break the binary number into 4-bit sections starting from the LSB to the MSB.
  2. Convert the 4-bit binary number to its hexadecimal equivalent.

For whole numbers, it may be necessary to add a zero as the MSB in order to complete a grouping of 4 bits.

For Example: To determine the hexadecimal equivalent of (11001011)2, we first break 11001011 from RHS into 4-bit section as 1100 (MSB) and 1011 (LSB).

Now, binary number 1100 (MSB) is equivalent to hexadecimal number C and binary number 1011 (LSB) is equivalent to hexadecimal number B.

Thus, the hexadecimal equivalent of (11001011)2 is (CB)16.

Conversion of Binary to Hexadecimal

The steps for converting a hexadecimal number to binary are as follows:

  1. Convert each hexadecimal digit to its 4-bit binary equivalent.
  2. Combine the 4-bit sections by removing the spaces to get the binary number.

For example: To determine the binary equivalent of (5AF)16, we first write the binary-coded value of hexadecimal number 5AF from LHS. That is hexadecimal number 5 has binary value 0101, hexadecimal number A has binary value 1010, and hexadecimal number F has binary value 1111.

Combining the 4-bits of the binary-coded values, we have 010110101111.

Thus, the binary equivalent of (5AF)16 is (010110101111)2.

(d) Conversion of Octal to Hexadecimal

The steps for converting an octal number to hexadecimal are as follows:

  1. Convert each octal digit to 3-bit binary form.
  2. Combine all the 3-bit binary numbers.
  3. Divide the binary numbers into the 4-bit binary form by starting the first number from the right bit to the first number from the left bit.
  4. Finally, convert these 4-bit blocks into their respective hexadecimal symbols.

For example: To determine the hexadecimal equivalent of (2327)8, we first convert it into their respective binary-coded values as 010, 011, 010, and 111, respectively.

Combining the 3-bit binary blocks, we have 010011010111.

Dividing the group of binary numbers into the 4-bit binary blocks from RHS and by converting these blocks into their respective hexadecimal symbols, we have

 

0100 1101 0111

4

D

7

 

Thus, the hexadecimal equivalent of (2327)8 is (4D7)16.

Conversion of Hexadecimal to Octal

This conversion follows the same steps of octal to hexadecimal conversion except that each hexadecimal digit is converted into a 4-bit form and then after grouping of all the 4-bit binary blocks, it is converted into the 3-bit binary form. Finally, these 3-bit binary forms are converted into octal symbols.

For example: To determine the octal equivalent of (2B6)16, we first convert it into their respective binary-coded values as 0010, 1011, and 0110, respectively.

Combining all the 4-bit binary blocks, we have 001010110110.

Dividing the group of binary numbers into the 3-bit binary blocks from RHS and by converting these blocks into their respective octal symbols, we have

 

001 010 110 110

1

2

2

6

 

Thus, the octal equivalent of (2B6)16 is (1266)8.

25. What are signed and unsigned numbers?

Ans.: An n-bit signed binary number consists of two parts: a part denoting the sign of the number and a part denoting the magnitude of the number (Figure 2.8). The MSB is always a sign bit that denotes the sign of the number and the convention is that 0 and 1 denote ‘+’ and ‘-’, respectively. The remaining (n - 1)-bit denotes the magnitude of the number. The 8-bit sign-magnitude system ranges from -127 to +127.

images

Figure 2.8 Representation of Signed Binary Number

In an unsigned binary number there are some restrictions. With 8-bit unsigned arithmetic, all magnitude must be between 0 and 255. Therefore, each number being added or subtracted must be between 0 and 255 and the answer must fall in the range of 0 to 255 (Figure 2.9).

images

Figure 2.9 Representation of Unsigned Binary Number

The rules for signed and unsigned binary numbers are as follows:

images In an unsigned number, the MSB is a weighted position bit.
images In a signed number, the MSB (the sign bit) is 0 for a positive number and 1 for a negative number.

26. Write a short note on complement.

Ans.: The complement of a number is the number that when added to the original will make it equal to a multiple of the base number system. It can be used as a representation of that number as a negative and as a positive number that represents a negative. Consequently, it is used in the digital computers for simplifying the subtraction operation and for the logical operation.

For every base ‘r’ system, there are two types of complements: r’s complement and (r - 1)’s complement. That is,

images For decimal r = 10, we have 9’s and 10’s complement.
images For binary r = 2, we have 1’s and 2’s complement.
images For octal r = 8, we have 7’s and 8’s complement.
images For hexadecimal r = 16, we have 15’s and 16’s complement.

27. Explain the following:

(a) Negative binary numbers using 1’s and 2’s complements

(b) Signed numbers using 2’s complement

Ans.: (a) Negative Binary Numbers Using 1’s Complement

All the negative numbers have the binary MSB = 1, which is helpful in identifying the sign of the number. The binary MSB is commonly known as the sign bit. This bit is useful in differentiating between positive and negative numbers.

To form the negative of any number, first complement all the bits of the number. This result is known as the 1’s complement of the original number. This requires changing every logic 1 bit in a number to logic 0, and every logic 0 bit to logic 1. For example, the 1’s complement of 0011 0110 in binary is shown in Table 2.5.

Table 2.5 Calculation of 1’s Complement

images

Negative Binary Numbers Using 2’s Complement

Taking the 2’s complement of the number will cause the MSB to become 1. To obtain the 2’s complement of a number, there is a two-step process:

  1. Take the 1’s complement of the number by changing every logic 1 bit in the number to logic 0 bit, and change every logic 0 bit to logic 1 bit.
  2. Add 1 to the 1’s complement of the binary number.

1’s and 2’s complements of 0011 0110 in binary are shown in Table 2.6.

Table 2.6 Representation of 1’s and 2’s Complements in Binary

images

(b) Representation of Signed Numbers Using 2’s Complement

Signed numbers can be represented by taking out the 2’s complement of the original number. However, this representation varies between positive and negative numbers. If the number is positive, the magnitude remains in its binary form and a sign bit of 0 is placed in front of the MSB.

For Example: +(12)10 in 2’s complement form is shown in Table 2.7.

Table 2.7 Calculating the 2’s Complement

images

However, if the number is negative, the magnitude is represented in its 2’s complement form and a sign bit 1 is placed in front of the MSB.

Addition/Subtraction of Signed Numbers Using 2’s Complement Addition

The addition of signed binary numbers represented in the radix complement form is similar to the unsigned case. However, when the 2’s complement of a number is added to any other binary number, it will be equivalent to its subtraction from that number. As a result, the subtraction of the signed numbers by the 2’s complement method is performed by using the following steps:

  1. Convert both the numbers into the binary equivalent form.
  2. Find the 2’s complement form of the subtrahend, number that is subtracting.
  3. Add this 2’s complement number to the minuend.
  4. If there is carry of 1, ignore it from the result to obtain the correct result.
  5. If there is no carry, recomplement the result and attach the negative sign to the obtained result.

For example, (27)10 adding with (-11)10 using the complementary representation for the negative value is shown as follows:

images

Now, add (011011)2 and (110101)2

images

Hence, the result is (010000)2 or (16)10.

It is to be noted that carry (1) is ignored and the result is (010000)2.

28. How are characters represented in the computer?

Ans.: There are lot of ways to represent numeric, alphabetic, and special characters in the computer's internal storage area. In the computer, the code is made up of fixed size groups of binary positions. Each binary position in a group is assigned a specific value: for example, 8, 4, 2, or 1. In this way, every character can be represented by a combination of bits that is unique. There are many coding schemes available for representing characters. The most commonly used coding systems are American Standard Code for Information Interchange (ASCII) code and Unicode.

29. What is the purpose of the binary coding system? Briefly explain the terms BCD, ASCII, and EBCDIC.

Ans.: In today's technology, the binary number system is used by the computer system to represent the data in the computer understandable format. Using binary-coding system, every character can be represented by a combination of bits that is different from any other combination. Data can also be arranged in a way that is very simple and easy to decode, or transmitted with varying degrees of redundancy for error detection and correction. The most commonly used coding systems are as follows:

images Binary-coded decimal (BCD): It is a method of using binary digits to represent the decimal digits 0 to 9. With BCD, each digit of a number is converted into its binary equivalent rather than converting the entire decimal number to its binary form.

Let us determine the BCD value for the decimal number 5319. Since there are 4 digits in our decimal number, there are 4 bytes in our BCD number. They are as follows:

 

Thousands—Hundreds Tens—Units
53 19
0 1 0 1 0 0 1 1 0 0 0 1 1 0 0 1

 

The later version of BCD used a 6-bit code. These BCD codes defined 6-bit words, which allowed representing a maximum of 64, that is, 26 symbols.

images American Standard Code for Information Interchange (ASCII): It is an 8-bit code used for data representation. It is commonly used in the transmission of data through data communication and is used almost exclusively to represent the data internally in the microcomputer. It is commonly used in the transmission of data through data communication and is used almost exclusively to represent the data internally in the microcomputer. In ASCII, rather than breaking letters into three groups, upper case letters are assigned codes beginning with hexadecimal value 41 and continuing sequentially through hexadecimal value 5A. Similarly, lower case letters are assigned hexadecimal values of 61 through 7A. The standard ASCII code defines 128 character codes (from 0 to 127), of which, the first 32 are control codes (non-printable) and the other 96 are representable characters.
images Extended Binary Coded Decimal Interchange Code (EBCDIC): It uses 8 bits for each character, hence it is possible to represent 256 different characters or bit combinations. This provides a unique code for each decimal value from 0 to 9 (for a total of 10), for each upper case and lower case letter (for a total of 52), and for a variety of special characters. Since it is an 8-bit code, each group of 8 bits makes up one alphabetic, numeric, or special character and is called a byte. The bit pattern 1100 is the zone combination (zone and digit) used for the alphabetic characters A through I, 1101 is used for the characters J through R, and 1110 is the zone combination used for characters S through Z. The bit pattern 1111 is the zone combination used when representing decimal digits.

30. Define BCD code. What are the disadvantages of using BCD code? How do we remove this problem? Is BCD code a weighted code? If yes, then explain.

Ans.: Binary-coded decimal (BCD) is a method of using binary digits to represent the decimal digits 0 to 9. BCD digits (0 to 9) are represented using 4-bits. The disadvantages of using BCD code are as follows:

images This coding is not sufficient for business purposes as it can represent only 16, that is, 24 symbols.
images Computers using BCD codes could work only with upper case letters and 0 to 9 numbers and few characters. This is not sufficient for providing decimal numbers (10), lower case letters (26), capital letters (26), and a large number of other special characters (28+).

Hence, the BCD code was extended from a 6-bit code to an 8-bit code that was known as Extended Binary Coded Decimal Interchange Code (EBCDIC). The added 2 bits are used as additional zone bits, expanding the zone to 4 bits. Thus, it is possible to represent 256 (28) different characters instead of 64 (26) by making use of EBCDIC.

Yes, BCD code is a weighted code as it is possible to assign weights to the binary bits according to their positions. The weights in the BCD code are 8 (23), 4 (22), 2 (21), and 1 (20).

31. What are gray codes? Explain how they are represented.

Ans.: The computer processes data in only digital form, that is, 0 and 1. Some systems employ the mechanism that the output generated from one computer should be given as an input in another computer. For this, the data should be converted into the digital format before being fed into the computer. To represent the numbers in digital form, a format is used that is known as gray code. The digits in gray code are not weighted and it is not an arithmetic code, that is, the bit positions do not represent any values like the binary codes. The advantage of gray code is that when we jump from one code word to another, there is change of only one single bit, that is, from 0 to 1 or vice versa. It can have any number of bits similar to the binary numbers. The number of combinations in gray code can be 2N, where N is the number of bits in a code. A 4-bit representation of gray code is shown along with its binary codes in Table 2.8.

Table 2.8 Representation of 4-Bit Gray Code

Decimal

Binary

Gray

0

0000

0000

1

0001

0001

2

0010

0011

3

0011

0010

4

0100

0110

5

0101

0111

6

0110

0101

7

0111

0100

8

1000

1100

9

1001

1101

10

1010

1111

11

1011

1110

12

1100

1010

13

1101

1011

14

1110

1001

15

1111

1000

32. How do we convert binary numbers into gray codes?

Ans.: A binary number is converted into a gray code using the OR operation and by following some specific rules. These rules are explained as follows:

images The most significant digit of the binary code is included as it is in the new gray code.
images Starting from left to right, each pair of binary digits are added (ORed) to get the next gray code digit excluding the carry.

For better understanding of the conversion technique, let us illustrate it with an example. Suppose we need to convert the binary number 0101 to its gray code. The steps for conversion are as follows:

  1. The left most digit in the gray code is kept same as the left most digit in the binary number 0101.

    images

  2. The left most binary digit is added to its adjacent digit to get the next gray code digit.

    images

  3. The next adjacent pair of the binary digit is added to get the next digit of the gray code.

    images

  4. The last adjacent pair of digits in the binary number is added to get the last digit of the gray code.

    images

So, the required gray code is 0111.

33. Write a short note on excess-3 code.

Ans.: The excess-3 (also known as XS-3) representation of a number is based on the BCD. It is formed by taking the number in the BCD and then adding the binary code for 3 (0011) to each of the 4-bit group. This means that if we take the number 739, then its BCD representation will be 0111 0011 1001. To get the excess-3 for 739, 0011 is added to each of the BCD code groups. That is,

 

0111 + 0011 = 1010
0011 + 0011 = 0110
1001 + 0011 = 1100

 

Thus, the excess-3 code for 739 will be 1010 0110 1100.

Excess-3 code is an example of a non-weighted code, since the position of each bit in excess-3 code does not have weights.

34. Convert (90)10 into the following:

(a) Binary number

(b) Octal number

(c) Hexadecimal number

Ans.: (a) Converting (90)10 into its binary equivalent:

images

Taking remainder bits from MSB to LSB, we have 1011010. Therefore, the binary equivalent of (90)10 is (1011010)2.

(b) Converting (90)10 into its octal equivalent:

images

Taking remainder bits from MSB to LSB, we have 132. Therefore, the octal equivalent of (90)10 is (132)8.

(c) Converting (90)10 into its hexadecimal equivalent:

images

Taking remainder bits from MSB to LSB, thus, we have 5 10. Therefore, the hexadecimal equivalent of (90)10 is (5A)16.

35. Perform the following conversions:

(a) FFFF to decimal

(b) 11.0001 to decimal

(c) 7F2 to octal

Ans.: (a) Conversion of FFFF to decimal:

  = 15 × 163 + 15 × 162 + 15 × 161 + 15 × 160
  = 61440 + 3840 + 240 + 15
  = (65535)10

(b) Conversion of 11.0001 to decimal:

  = 1 × 21 + 1 × 20 + 0 × 2-1+ 0 × 2-2 + 0 × 2-3 + 1 × 2-4
  = 2 + 1 + 0 + 0 + 0 + 1/16
  = 3 + 0.0625
  = (3.0625)10

(c) Conversion of 7F2 to octal:

Firstly, converting it into decimal:

  = 7 × 162 + 15 × 161 + 2 × 160
  = 1792 + 240 + 2
  = (2034)10

Now, converting decimal to octal to obtain the final result:

images

Taking remainder bits from MSB to LSB, we have 3762. Thus, the octal equivalent of 7F2 is (3762)8.

36. Add the following:

(a) (110101)2 and (110100)2

(b) (10111110)2 and (10011001)2

Ans.: (a) Addition of (110101)2 and (110100)2:

images

(b) Addition of (10111110)2 and (10011001)2:

images

37. Subtract (1010)2 from (110001)2.

Ans.:

images

38. Represent (-45)10 in its 2’s complement form.

Ans.: Firstly, converting (45)10 into its binary equivalent:

images

After taking remainder bits from MSB to LSB, we have 101101. Thus, the binary equivalent of (45)10 is (101101)2. The calculation involved in converting 101101 to its 2’s complement form is shown in Table 2.9.

Table 2.9 Calculation of Converting (-45)10 to Its 2’s Complement

images

As the given decimal number is negative, we will add 1 in the sign bit to represent the final result in the negative form. So, the 2’s complement form of (-45)10 is (1010011)2.

39. Represent (10111110)2 in its 2’s complement form.

Ans.: The calculation involved in converting (10111110)2 to its 2’s complement form is shown in Table 2.10.

Table 2.10 Calculation of Converting (10111110)2 to Its 2’s Complement

images

Therefore, the 2’s complement form of (10111110)2 is (001000010)2.

40. Convert (B1C.5A9)16 into the following:

(a) Binary number

(b) Octal number

Ans.: (a) The conversion of (B1C.5A9)16 into its binary form is shown in Table 2.11.

Table 2.11 Conversion of (B1C.5A9)16 into Its Binary Form

images

Now, combining all the 4-bit binary coded value, we have (101100011100.010110101001)2.

(b) Dividing the group of binary numbers into the 3-bit binary blocks and then converting these blocks into their respective octal symbols, we have

images

Thus, the octal equivalent of (B1C.5A9)16 is (5434.2651)8.

41. Perform the following:

(a) (426)8 = (?)16

(b) (3025)10 = (?)9

Ans.: (a) The conversion of (426)8 into its binary form is shown in Table 2.12.

Table 2.12 Conversion of (426)8 into Its Binary Form

images

Combining the 3-bit binary blocks, we have 100010110.

Now, dividing the group of binary numbers into the 4-bit binary blocks and by converting these blocks into their respective hexadecimal symbols, we have

 

0001 0001 0110

1

1

6

 

Thus, the hexadecimal equivalent of (426)8 is (116)16.

(b)

images

Taking remainder bits from MSB to LSB, we have 4131. Therefore, the base 9 equivalent of (3025)10 is (4131)9.

42. Using 2’s complement, calculate the following:

(a) 01000110 + 00011011

(b) 10111001 + 10011001

(c) 00001010 – 00110011

(d) 1000011 – 00110101

Ans.: (a) 01000110 + 00011011

As both numbers are positive, we cannot perform complement operation on positive number. Thus, both numbers will be added just like addition of two positive numbers as follows:

images

(b) 10111001 + 10011001

As both numbers are positive, we cannot perform complement operation on positive number. Thus, both numbers will be added just like addition of two positive numbers as follows:

images

(c) 00001010 - 00110011 is equivalent to 00001010 + (-00110011).

As there is a negative sign with 00110011, we will take 1’s complement of (00110011) = 11001100.

images

As the sign bit is 1, we again perform the 2’s complement on the result:

11010111 = 00101001

Hence, (00001010) + (-00110011) = 00101001.

(d) 1000011 – 00110101

As there is a negative sign with 00110101, we will take the 1s complement of (00110101) = 11001010.
2’s complement of (00110101) = 11001011
Now we will add both numbers after adding sign bit with both numbers (0 for positive, 1 for negative):

images

Therefore, the result is 000001110.

As the result is positive, we discard the sign bit, that is 0 from 000001110, and hence the final result is (01000011) – (00110101) = 00001110.

Multiple-choice Questions

1.  ALU works on the instructions and data held in the ____________.

(a) Notebook

(b) Registers

(c) Copy pad

(d) I/O devices

2.  A register that keeps track of the next instruction to be executed is called a ____________.

(a) Program counter

(b) Instruction register

(c) Accumulator

(d) Data register

3.  The fastest memory in a computer system is ____________.

(a) ROM

(b) RAM

(c) Cache

(d) None of these

4.  The set of wires that carry information in a controlled manner is called____________.

(a) System bus

(b) Public bus

(c) Private bus

(d) None of these

5.  In the sequence of events that takes place in an instruction cycle, the first cycle is ____________.

(a) Store cycle

(b) Execute cycle

(c) Fetch cycle

(d) Decode cycle

6.  ____________ is a type of processor architecture that utilizes a small, highly optimized set of instructions.

(a) CISC

(b) RISC

(c) VISC

(d) LISC

7.  RISC processors are ideal for embedded applications, such as mobile phones and PDAs because____________.

(a) They are smaller in size and consume less power.

(b) They are large in size and consume less power.

(c) They are smaller in size and consume more power.

(d) They are larger in size and consume large amount of power.

8.  The concept of CISC architecture is to accomplish the task in ____________.

(a) As longer lines of code as possible

(b) As few lines of code as possible

(c) Both (a) and (b)

(d) None of these

9.  The most important part of a computer is ____________.

(a) Hard disk

(b) RAM

(c) Mother board

(d) None of these

10.  An expansion card that allows the computer to output sound through connected speakers is ____________.

(a) Video card

(b) Network interface card

(c) PC card

(d) Sound card

Answers

1. (b)

2. (a)

3. (c)

4. (a)

5. (c)

6. (b)

7. (a)

8. (b)

9. (c)

10. (d)

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.144.18.253