How are Characters stored in RAM?

Pronounced ram, meaning random access memory, a type of computer memory that can be accessed randomly; that is, and any byte of memory can be accessed without touching the preceding bytes. RAM is the most common type of memory found in computers and other devices, such as printers.

Random Access Memory is considered random access because you can access any memory cell directly if you know the address of the cell. The address is determined by where a row and column intersect at a memory cell. A memory cell consists of a transistor and a capacitor working together. A character is a variable that can be made to represent anything that we want it to. However, a character set was developed to help maintain a standard when associating bits to symbols or characters.

The decimal value 1 represents a character, and a single character represents 8 bits of data. As we have previously seen the decimal value 1 in binary is represented as 00110001 for a total of 8 bits.  

For example, the following three binary arrangements; 00110000, 00110001, 00110010, represent the decimal values 0, 1, and 2 respectively.

Memory cells alone would be worthless without some way to get information in and out of them. So the memory cells have a whole support infrastructure of other specialized circuits. These circuits perform functions such as:

  • Identifying each row and column (row address select and column address select)
  • Keeping track of the refresh sequence (counter)
  • Reading and restoring the signal from a cell (sense amplifier)
  • Telling a cell whether it should take a charge or not (write enable)

Other functions of the memory controller include a series of tasks that include identifying the type, speed and amount of memory and checking for errors.

 

 

Where in Ram will it be stored?

That depends on where there is space available. The total space available has already been allocated for the operating system, the C program which you are running, the environment which is running and any others programs you might have previously placed into RAM. The actual location assignment will be made at run-time.

 

Will the locations assigned be contiguous?

Possibly, but not necessary. If contiguous space is available, then probably so, but if not, they will be assigned wherever space available.

 

What is the difference between the way characters and integers are stored in Ram?

Is that integer (data type int) require 2 bytes (16 bytes) of storage.

 

How is the data type long stored in RAM?

The data type long corresponds to the same rules as the data type int, except it requires 4 bytes (32 bits) of contiguous storage per variable.