Anatomy of Digital Computer


Digital Computer, any of a class of devices capable of solving problems by processing information in discrete form. It operates on data, including magnitudes, letters, and symbols, that are expressed in binary form—i.e., using only the two digits 0 and 1. By counting, comparing, and manipulating these digits or their combinations according to a set of instructions held in its memory, a digital computer can perform such tasks as to control industrial processes and regulate the operations of machines.

We should keep in mind that a computer is a programmable machine. The two main characteristics of a computer are:

->
It responds to a specific set of instructions in a well-defined manner.

-> It can execute a pre-recorded list ofinstructions (a program).

Modern computers are electronic and digital. The actual machinery - wires, transistors and circuits is called hardware.The instructions and data are called software. All general purpose computers require the following hardware components:

1.)
Central Processing Unit (CPU) - The ‘brain’ of the computer, the component that actually executes instructions.

2.)
Memory  -  It enables a computer to store, at least temporarily, data and programs.

3.) Input device -  Usually a keyboard or mouse is used to read data and programs into the computer.

4.) Output device - A display screen, printer, etc. that lets you see what the computer has accomplished.

5.) Mass storage device - It allows a computer to permanently store large amounts of data. Common mass storage devices include disk drive and tape drive.

In addition to these components, many others make it possible for the basic components of a computer to work together efficiently.

Functions and Components of a Computer

To function properly, the computer needs both hardware and software. Hardware consists of the mechanical and electronic devices, which we can see and touch. The software consists of programs, the operating system and the data that reside in the memory and storage devices. A computer does mainly the following four functions:

-> Receive input - Accept data/information from outside through various input devices like the keyboard, mouse, scanner, etc.

-> Process information - Perform arithmetic or logical operations on data/information.

-> Produce output—Communicate information to the outside world through output devices like monitor, printer, etc.

-> Store information—Store the information in storage devices like hard disk, floppy disks, CD, etc.

These four basic functions are responsible for everything that computers do. The hardware components of the computer specialize in any one of these functions.

Computer hardware falls into two categories: processing hardware and the peripheral devices. The Processing hardware consists of the Central Processing Unit (CPU), and as its name implies, is where the data processing is done. Peripheral devices allow people to interact with the CPU. Together, they make it possible to use the computer for a variety of tasks.

Central Processing Unit (CPU)

This part of the computer that executes program instructions is known as the processor or Central Processing Unit (CPU). In a microcomputer, the CPU is based on a single electronic component, the microprocessor chip, within the system unit or system cabinet. The system unit also includes circuit boards, memory chips, ports and other components. A microcomputer’s system cabinet.
will also house disk drives, hard disks, etc., but these are considered separate from the CPU.
The CPU has two parts :

1.)
The Control Unit (CU).

2.)
The Arithmetic Logic Unit (ALU).

Note : In a microcomputer, both are on a single microprocessor chip.

Control Unit (CU) - The control unit tells the rest of the computer system how to carry out a program’s instructions. It directs the movement of electronic signals between memory - which temporarily holds data, instructions and processes information - and the ALU. It also directs these control signals between the CPU and input/output devices.

Arithmetic/Logic Unit (ALU) - Arithmetic Logic Unit, usually called the ALU, performs two types of operations - arithmetical and logical. Arithmetical operations are the fundamental mathematical operations consisting of addition, subtraction, multiplication and division. Logical operations consist of comparisons. That is two pieces of data are compared to see whether one is equal to, less than, or greater than the other.

Memory

Memory - also known as the primary storage or main memory - is a part of the microcomputer that holds data and instructions. Part of the contents of the memory is held only temporarily, that is, it is stored only as long as the microcomputer is turned on. When you turn the machine off, the contents are lost. The capacity of the memory to hold data and program instructions varies in different computers. The original IBM PC could hold approximately several thousand characters of data or instructions only. But modern microcomputers can hold millions or even billions of characters in their memory.

Registers

Computers also have several additional storage locations called registers. These appear in the Control Unit and ALU and make processing more efficient. Registers are a sort of special hi-speed storage areas that hold data and instructions temporarily during processing. They are parts of the Control Unit and ALU rather than the memory. Their contents can, therefore be handled much faster than the contents of the memory.

Addresses

To locate the characters of data or instructions in the main memory, the computer stores them in locations known as addresses. A unique number designates each address. Addresses can be compared to post office mailboxes. Their numbers remain the same, but contents continuously change.

How the CPU and Memory work

->  The control unit recognizes that the program has been loaded into the memory. It begins to execute the first step in the program.

-> The program tells the user, "Enter 1st Number".

-> The user types the number 100 on the keyboard. An electronic signal is sent to the CPU.

-> The control unit recognizes this signal and routes the signal to an address in memory - say address 7.

-> After completing the above instruction, the next instruction tells the user, "Enter 2nd Number."

-> The user types the number 4 on the keyboard. An electronic signal is sent to the CPU.

-> The control unit recognizes this signal and routes it to memory address

-> The next program instruction is executed - "Multiply 1st and 2nd Numbers."

-> To execute this instruction, the control unit informs the ALU that two numbers are coming and the ALU is to multiply them. The control unit next sends to the ALU a copy of the contents of address 7 (100) and address 8(4).

-> ALU performs the multiplication : 100 × 4 = 400

-> The control unit sends a copy of the multiplied result (400:) back to memory to store it in address 9.

-> The next program instruction is executed : "Print the Result."

-> To execute this instruction, the control unit sends the contents of the address 9 (400) to the monitor.

-> Monitor displays the value 400.

-> Final instruction is executed: "End". The program is complete