There are two kinds of computer memory: primary and secondary. Primary memory is accessible directly by the processing unit. RAM is an example of primary memory. As soon as the computer is switched off, the contents of the primary memory is lost. You can store and retrieve data much faster with primary memory compared to secondary memory. Secondary memory such as floppy disk, magnetic disk, etc., is located outside the computer. Primary memory is more expensive than secondary memory. Computer memory is used to store two things: i) instructions to execute a program and ii) data. When the computer is doing any job, the data that have to be processed are stored in the primary memory. This data may come from an input device like keyboard or from a secondary storage device like a floppy disk.As program or the set of instructions is kept in primary memory, the computer is able to follow instantly the set of instructions. For example, when you book ticket from railway reservation counter, the computer has to follow the same steps : take the request, check the availability of seats, calculate fare, wait for money to be paid, store the reservation and get the ticket printed out. The program containing these steps is kept in memory of the computer and is followed for each request. But inside the computer, the steps followed are quite different from what we see on the monitor or screen. In computer’s memory both programs and data are stored in the binary form. You have already been introduced with decimal number system, that is the numbers 1 to 9 and 0.
The binary system has only two values 0 and 1. These are called bits. As human beings we all understand decimal system but the computer can only understand binary system. It is because a large number of integrated circuits inside the computer can be considered as switches, which can be made ON, or OFF. If a switch is ON it is considered 1 and if it is OFF it is 0. A number of switches in different states will give you a message like this: 110101……10. So the computer takes input in the form of 0 and 1 and gives output in the same form, i.e., 0 and 1 only. Is it not absurd if the computer gives outputs as 0’s & 1’s only? But you do not have to worry about. Every number in binary system can be converted to decimal system and vice versa; for example, 1010 meaning decimal 10. Therefore, it is the computer that takes information or data in decimal form from you, converts it into binary form, processes it producing output in binary form and finally again converts the output to decimal form.
The primary memory as you know in the computer is in the form of IC’s (Integrated Circuits). These circuits are called Random Access Memory (RAM). Each of RAM’s location stores one byte of information. (One byte is equal to 8 bits). A bit is an acronym for binary digit, which stands for one binary piece of information. This can be either 0 or 1. You will know more about RAM later. The Primary or internal storage unit is made up of several small storage locations called cells. Each of these cells can store a fixed number of bits called word length.
Each cell has a unique number assigned to it called the address of the cell and it is used to identify the cells. The address starts at 0 and goes up to (N-1). You should know that the memory is like a large cabinet containing as many drawers as there are addresses son memory. Each drawer contains a word and the address is written on outside of the drawer.