Computer Organization
A Computer has five functional independent units like Input Unit, Memory Unit, Arithmetic & Logic Unit, Output Unit and Control Unit.
Input Unit:-
Computers take coded information via input unit. The most famous input device is keyboard. Whenever we press any key it is automatically being translated to corresponding binary code & transmitted over a cable to memory or processor.
Memory Unit:-
It stores programs as well as data and there are two types- Primary and Secondary Memory
Primary Memory is quite fast which works at electronic speed. Programs should be stored in memory before getting executed. Random Access Memory is that memory in which location can be accessed in a shorter period of time after specifying the address. Primary memory is essential but expensive so we went for secondary memory which is quite cheaper. It is used when large amount of data & programs are needed to store, particularly the information that we don’t access very frequently. Ex- Magnetic Disks, Tapes
Arithmetic & Logic Unit:-
All the arithmetic & Logical operations are performed by ALU and this operation are initiated once the operands are brought into the processor.
Output Unit: –
It displays the processed result to outside world.
Computer Block Diagram:-
Memory Unit:-
Computer memory is a generic term for all of the different types of data storage technology that a computer may use, including RAM, ROM, and flash memory.
Some types of computer memory are designed to be very fast, meaning that the central processing unit (CPU) can access data stored there very quickly. Other types are designed to be very low cost, so that large amounts of data can be stored there economically.
Another way that computer memory can vary is that some types are non-volatile, which means they can store data on a long term basis even when there is no power. And some types are volatile, which are often faster, but which lose all the data stored on them as soon as the power is switched off.
A computer system is built using a combination of these types of computer memory, and the exact configuration can be optimized to produce the maximum data processing speed or the minimum cost, or some compromise between the two.
Types of Computer Memory: Primary and Secondary
Although many types of memory in a computer exist, the most basic distinction is between primary memory, often called system memory, and secondary memory, which is more commonly called storage.
The key difference between primary and secondary memory is speed of access.
- Primary memory:- includes ROM and RAM, and is located close to the CPU on the computer motherboard, enabling the CPU to read data from primary memory very quickly indeed. It is used to store data that the CPU needs imminently so that it does not have to wait for it to be delivered.
- Secondary memory:- by contrast, is usually physically located within a separate storage device, such as a hard disk drive or solid state drive (SSD), which is connected to the computer system either directly or over a network. The cost per gigabyte of secondary memory is much lower, but the read and write speeds are significantly slower.
Primary Memory Types: RAM and ROM
There are two key types of primary memory:
- RAM, or random access memory
- ROM, or read-only memory
Let’s look in-depth at both types of memory.
1) RAM Computer Memory
The acronym RAM stems from the fact that data stored in random access memory can be accessed – as the name suggests – in any random order. Or, put another way, any random bit of data can be accessed just as quickly as any other bit.
The most important things to understand about RAM are that RAM memory is very fast, it can be written to as well as read, it is volatile (so all data stored in RAM memory is lost when it loses power) and, finally, it is very expensive compared to all types of secondary memory in terms of cost per gigabyte. It is because of the relative high cost of RAM compared to secondary memory types that most computer systems use both primary and secondary memory.
Data that is required for imminent processing is moved to RAM where it can be accessed and modified very quickly, so that the CPU is not kept waiting. When the data is no longer required it is shunted out to slower but cheaper secondary memory, and the RAM space that has been freed up is filled with the next chunk of data that is about to be used.
Types of RAM:-
- DRAM: DRAM stands for Dynamic RAM, and it is the most common type of RAM used in computers. The oldest type is known as single data rate (SDR) DRAM, but newer computers use faster dual data rate (DDR) DRAM. DDR comes in several versions including DDR2 , DDR3, and DDR4, which offer better performance and are more energy efficient than DDR. However different versions are incompatible, so it is not possible to mix DDR2 with DDR3 DRAM in a computer system. DRAM consists of a transistor and a capacitor in each cell.
- SRAM: SRAM stands for Static RAM, and it is a particular type of RAM which is faster than DRAM, but more expensive and bulker, having six transistors in each cell. For those reasons SRAM is generally only used as a data cache within a CPU itself or as RAM in very high-end server systems. A small SRAM cache of the most imminently-needed data can result in significant speed improvements in a system
The key differences between DRAM and SRAM is that SRAM is faster than DRAM – perhaps two to three times faster – but more expensive and bulkier. SRAM is usually available in megabytes, while DRAM is purchased in gigabytes.
DRAM uses more energy than SRAM because it constantly needs to be refreshed to maintain data integrity, while SRAM – though volatile – does not need constant refreshing when it is powered up.
2) ROM Computer Memory
ROM stands for read-only memory, and the name stems from the fact that while data can be read from this type of computer memory, data cannot normally be written to it. It is a very fast type of computer memory which is usually installed close to the CPU on the motherboard.
ROM is a type of non-volatile memory, which means that the data stored in ROM persists in the memory even when it receives no power – for example when the computer is turned off. In that sense it is similar to secondary memory, which is used for long term storage.
When a computer is turned on, the CPU can begin reading information stored in ROM without the need for drivers or other complex software to help it communicate. The ROM usually contains “bootstrap code” which is the basic set of instructions a computer needs to carry out to become aware of the operating system stored in secondary memory, and to load parts of the operating system into primary memory so that it can start up and become ready to use.
ROM is also used in simpler electronic devices to store firmware which runs as soon as the device is switched on.
Types of ROM
ROM is available in several different types, including PROM, EPROM, and EEPROM.
- PROM:- PROM stands for Programmable Read-Only Memory, and it is different from true ROM in that while a ROM is programmed (i.e. has data written to it) during the manufacturing process, a PROM is manufactured in an empty state and then programmed later using a PROM programmer or burner.
- EPROM:- EPROM stands for Erasable Programmable Read-Only Memory, and as the name suggests, data stored in an EPROM can be erased and the EPROM reprogrammed. Erasing an EPROM involves removing it from the computer and exposing it to ultraviolet light before re-burning it.
- EEPROM:- EEPROM stands for Electrically Erasable Programmable Read-Only Memory, and the distinction between EPROM and EEPROM is that the latter can be erased and written to by the computer system it is installed in. In that sense EEPROM is not strictly read-only. However in many cases the write process is slow, so it is normally only done to update program code such as firmware or BIOS code on an occasional basis
Confusingly, NAND flash memory (such as that found in USB memory sticks and solid state disk drives) is a type of EEPROM, but NAND flash is considered to be secondary memory.
Secondary Memory Types:-
Secondary memory comprises many different storage media which can be directly attached to a computer system. These include:
- hard disk drives
- solid state drives (SSDs)
- Optical (CD or DVD) drives
- Tape drives
Secondary memory also includes:
- Storage arrays including 3D NAND flash arrays connected over a storage area network (SAN)
- Storage devices which may be connected over a conventional network (known as network attached storage, or NAS)
Arguably cloud storage can also be called secondary memory.
Differences between RAM and ROM:-
ROM:-
- Non-volatile
- Fast to read
- Usually used in small quantities
- Cannot be written to quickly
- Used to store boot instructions or firmware
- Relatively expensive per megabyte stored compared to RAM
RAM:-
- Volatile
- Fast to read and write
- Used as system memory to store data (including program code) that the CPU needs to process imminently
- Relatively cheap per megabyte stored compared to ROM, but relatively expensive compared to secondary memory.
Memory unit is the amount of data that can be stored in the storage unit. This storage capacity is expressed in terms of Bytes.
The following table explains the main memory storage units −
S.No. | Unit & Description |
1 | Bit (Binary Digit) A binary digit is logical 0 and 1 representing a passive or an active state of a component in an electric circuit. |
2 | Nibble A group of 4 bits is called nibble. |
3 | Byte A group of 8 bits is called byte. A byte is the smallest unit, which can represent a data item or a character. |
4 | Word A computer word, like a byte, is a group of fixed number of bits processed as a unit, which varies from computer to computer but is fixed for each computer. The length of a computer word is called word-size or word length. It may be as small as 8 bits or may be as long as 96 bits. A computer stores the information in the form of computer words. |
The following table lists some higher storage units −
Sr.No. | Unit & Description |
1 | Kilobyte (KB) 1 KB = 1024 Bytes |
2 | Megabyte (MB) 1 MB = 1024 KB |
3 | Gigabyte (GB) 1 GB = 1024 MB |
4 | Terabyte (TB) 1 TB = 1024 GB |
5 | PetaByte (PB) 1 PB = 1024 TB |
6 | Exabyte(EB) 1 EB = 1024 PB |
7 | Zeta Byte(ZB) 1 ZB = 1024 EB |