Autosave: 2024-07-12 08:00:04
This commit is contained in:
parent
832fe53204
commit
c1bdffc0b8
6 changed files with 48 additions and 4 deletions
BIN
.zk/notebook.db
BIN
.zk/notebook.db
Binary file not shown.
9
zk/DRAM_and_SRAM_memory.md
Normal file
9
zk/DRAM_and_SRAM_memory.md
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
---
|
||||||
|
title: DRAM_and_SRAM_memory
|
||||||
|
tags: [memory]
|
||||||
|
created: Friday, July 12, 2024
|
||||||
|
---
|
||||||
|
|
||||||
|
# DRAM_and_SRAM_memory
|
||||||
|
|
||||||
|
## Related notes
|
|
@ -46,12 +46,12 @@ is the number of bits.
|
||||||
We need to reverse this formula to find out how many bits we need to represent a
|
We need to reverse this formula to find out how many bits we need to represent a
|
||||||
given number of addresses. We can do this with a [logarithm](Logarithms.md).
|
given number of addresses. We can do this with a [logarithm](Logarithms.md).
|
||||||
|
|
||||||
We can reverse the formula as follows: number of bits = $\log_2$(number of
|
We can reverse the formula as follows: number of bits = $\log_2$ (number of
|
||||||
addresses).
|
addresses).
|
||||||
|
|
||||||
In our case we have 65,536 addresses so we need $\log_2(65,536)$ bits to
|
In our case we have 65,536 addresses so we need $\log_2(65,536)$ bits to
|
||||||
represent each address. This is approximately 16 bits. Thus a 16 bit memory
|
represent each address. This is approximately 16 bits. Thus a 16 bit memory
|
||||||
address is needed to address 65, 546 bytes.
|
iaddress is needed to address 65, 546 bytes.
|
||||||
|
|
||||||
Using memory addresses we end up with tables like the following:
|
Using memory addresses we end up with tables like the following:
|
||||||
|
|
||||||
|
|
|
@ -42,7 +42,7 @@ With this method, the reduction can be completed in a single step.
|
||||||
The greatest common divisor of 18 and 24 is 6, thus:
|
The greatest common divisor of 18 and 24 is 6, thus:
|
||||||
|
|
||||||
$$
|
$$
|
||||||
\\frac{18}{24} = \frac{18/6}{24/6} = \frac{3}{4}
|
\frac{18}{24} = \frac{18/6}{24/6} = \frac{3}{4}
|
||||||
$$
|
$$
|
||||||
|
|
||||||
Note how our earlier two divisors 2 and 3 are
|
Note how our earlier two divisors 2 and 3 are
|
||||||
|
|
|
@ -52,4 +52,4 @@ other with separate address spaces that cannot interact.
|
||||||
// Next: the kernel also uses virtual memory however isn't also responsible for
|
// Next: the kernel also uses virtual memory however isn't also responsible for
|
||||||
the appportioning of virtual memory. Confused.
|
the appportioning of virtual memory. Confused.
|
||||||
|
|
||||||

|

|
||||||
|
|
35
zk/What_is_memory.md
Normal file
35
zk/What_is_memory.md
Normal file
|
@ -0,0 +1,35 @@
|
||||||
|
---
|
||||||
|
title: What_is_memory
|
||||||
|
tags: [memory]
|
||||||
|
created: Friday, July 12, 2024
|
||||||
|
---
|
||||||
|
|
||||||
|
# What is memory ?
|
||||||
|
|
||||||
|
## Why do we need memory?
|
||||||
|
|
||||||
|
> A CPU is just an operator on memory. It reads its instructions and data from
|
||||||
|
> the memory and writes back out to the memory. (Ward 2021)
|
||||||
|
|
||||||
|
When a [CPU](CPU_architecture.md) executes a program, it needs a place to store
|
||||||
|
the program's **instructions** and **related data**. This is the role of memory.
|
||||||
|
|
||||||
|
## What is memory?
|
||||||
|
|
||||||
|
The data that comprises a program is a series of bits. The basic unit of memory
|
||||||
|
storage is a **memory cell**: a circuit that can store a single bit.
|
||||||
|
|
||||||
|
## Memory types
|
||||||
|
|
||||||
|
There are two types of memory: [SRAM and DRAM](./DRAM_and_SRAM_memory.md). Both
|
||||||
|
types of RAM memory are _volatile_ : the memory is only retained whilst the
|
||||||
|
computer has a power supply and is wiped when the computer is rebooted. This
|
||||||
|
contrasts with the memory of the harddisk which is non-volatile and is retained
|
||||||
|
after a reboot.
|
||||||
|
|
||||||
|
Programs that are executing are loaded into memory because the chips that
|
||||||
|
comprise memory can read and store data much faster than the harddisk. It would
|
||||||
|
be possible to run a program from the harddisk but it would be 500 - 1000 times
|
||||||
|
slower than memory.
|
||||||
|
|
||||||
|
## Related notes
|
Loading…
Add table
Reference in a new issue