Download presentation
Presentation is loading. Please wait.
Published bySharyl Casey Modified over 9 years ago
1
Riyadh Philanthropic Society For Science Prince Sultan College For Woman Dept. of Computer & Information Sciences CS 251 Introduction to Computer Organization & Assembly Language Lecture 5 (Computer System Organization) Main Memory - I
2
From text Book: 2.2.1, 2.2.2, 2.2.3 Memory Organization RAMs ROMS Cache memories Memory types comparison Memory packaging and types 2Main Memory
3
3 The memory is the place where data and programs are stored The bit, a binary digit, is the main unit of memory The collection of bits are organized into cells ( or locations) Each of these cells will store a piece of information
4
4Main Memory Memories consists of a number of cells Each cell has a number called its address by which programs can refer to it If a memory has k cells, they will have addresses from 0 to k-1 All cells in memory contain the same number of bits If the memory holds n bits, it can hold 2 k bit combinations Adjacent cells have consecutive addresses
5
5Main Memory Three different ways to represent a 96-bit memory Address Address Address 0 1 2 3 4 5 6 7 8 9 10 11 0123456701234567 012345012345 8 bits 12 bits 16 bits Cell
6
Memory addresses are expressed as binary numbers An n bit memory address allows for a maximum of 2 n cells access Ex. How many bits would you need to address 12 cells 4 bits are needed to be able to reference the addresses from 0 to 11 The number of bits in the address is independent than the number of bits per cell Ex. A memory with 2 12 cells of 8 bits each and a memory with 2 12 cells of 64 bits each need 12-bit address. 6Main Memory
7
Nearly all computer manufacturers have standardized on an 8-bit cell, called byte Bytes are grouped into words A computer with a 32-bit word has 4 bytes/word. Whereas a computer with a 64-bit word has 8 bytes/word. Most instructions operate on entire words (e. adding two words) Thus, a 32-bit machine will have 32-bit registers and instructions for manipulating 32-bit words. The same applies for a 64-bit machine 7Main Memory
8
There are two conventions for storing data in memory 8Main Memory 3210 0 7654 4 111098 8 15141312 Byte 32 – bit word 0 0123 4 4567 8 891011 12 131415 32 – bit word Byte
9
Problems occur when the data is a collection of integers, character strings, and other data types When computers with different data representation communicate, problems occur !!! 9Main Memory MIJ 0 TIMS 4 000H 8 21000 12 4100 16 Byte 32 – bit word 0 JIM 4 SMIT 8 H000 12 21000 16 4100 32 – bit word Byte
10
Transfer has reversed the order of the bytes Swapping doesn’t solve the problem A protocol including a header with each transfer can be an inefficient solution 10Main Memory JIM 0 SMIT 4 H000 8 00021 12 0014 16 Byte 32 – bit word 0 MIJ 4 TIMS 8 000H 12 21000 16 4100 32 – bit word Byte
11
The memory is specified by the number of words it has and the number of bits per word. Ex. A memory of 2048*10 memory width = word size = 10 bits address space = memory size = 2048 = 2 11 Address consists of 11 bits 11Main Memory M bits Memory Words Address 00...0 00...1 2 n -1 2 n memory size
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.