mirror of
https://github.com/jackyzha0/quartz.git
synced 2025-12-24 21:34:06 -06:00
46 lines
1.4 KiB
Markdown
46 lines
1.4 KiB
Markdown
---
|
|
title: "memory"
|
|
aliases:
|
|
tags:
|
|
- cosc204
|
|
---
|
|
|
|
Computer memory is a series of switches (similar to the switchboard in a house). Each switch is identified by a number and is either on or off.
|
|
|
|
(High level) Programming languages allow us to name some of the locations using variables. this is easier than remembering the number of each "switch"
|
|
|
|
These switches are mostly located in RAM. But there are also switches within the CPU called registers
|
|
|
|
# SRAM
|
|
Static ram is:
|
|
- made from flip flops.
|
|
- mostly used in the cpu cache or anywhere where only a small amout of memory is needed.
|
|
- comparatively expensive to DRAM
|
|
|
|
# DRAM
|
|
Dynamic ram is:
|
|
- made from capacitors
|
|
- used where a large amount of memory is needed
|
|
- slower than SRAM
|
|
- inexpensive
|
|
|
|
# Non volatile memory
|
|
This is often called ROM (read only memory)
|
|
- can also be called PROM, EPROM, EEPROM, FLASH (floating-gate flash cells not transistors )
|
|
|
|
# Registers
|
|
- Registers are memory cells with names within the CPU.
|
|
- They hold data instructions or CPU status.
|
|
|
|
## Special purpose registers
|
|
- program counter
|
|
- stores address of current instruction
|
|
- accumulator
|
|
- source of one of the operands
|
|
- destination of the result
|
|
- status flags
|
|
- individaul bits store information about results of operations
|
|
- result of last instruction was negative, zero, or postive
|
|
- carry from most recent arithmetic operation
|
|
- overflow occurred during the last instruction
|