Fixed and Variable Word Length Memory




Fixed and Variable Word Length Memory

A. Main memory of some computers can store a fixed number of character (equal to its word-length in bytes) in each numbered address location. Such computers are said to be word-addressable and they employ fixed-word-length memory approach. These computers always allocate storage space in multiples of word-length. Therefore, if a word adorable computer has fixed word-length of 4 bytes (4 characters, it will require one word (4 bytes) to store the word "CAT" and two words (8 bytes) to store the word "BOMBAY".

In many computers, main memory is designed to store a single character (A, B, 1, 2, +, -, etc) at each numbered address. Computers designed in this manner are said to be character-addressable and they employ variable-word-length memory approach. Hence, in these computers only 3 bytes are required to store the word " CAT" and 6 bytes to store the word "BOMBAY". Figure 7.4 summarizes the difference between fixed-word-length and variable-word-length memory approaches.

Both fixed and variable word-length memory systems have their own merits and demerits. Normally, large scientific computers use fixed-word-length approach for gaining speed calculation. On the other hand, small business computers use variable-word-length approach for optimizing use of storage space. For example, let us consider a fixed-word-length memory computer with word size of eight characters. If most of the data words to be stored are of less than five characters, more than half of its storage space will remain unused. This will not happen in case of a computer with variable-word-length memory because it can place a character in every storage cell. However, word-addressable computers possess faster calculating capability because they can add two data words in a single operation. If word length of a computer that uses fixed-word-length approach is eight characters, it can add two eight-digit numbers in a single operation. On the other hand, a character-addressable computer can add only one digit in each number during a single operation, and would need eight steps to add two eight-digit numbers.

We can design a computer to employ either fixed-word-length or variable-word-length memory organization. These computers have an instruction set, using which we can operate them as either variable-or fixed-word-length memory computers. However, with memory becoming cheaper and larger day-by-day, most modern computers employ fixed-word-length memory organization.