diff --git a/.zk/notebook.db b/.zk/notebook.db index 1a0a92f..dc05620 100644 Binary files a/.zk/notebook.db and b/.zk/notebook.db differ diff --git a/zk/DRAM_and_SRAM_memory.md b/zk/DRAM_and_SRAM_memory.md new file mode 100644 index 0000000..30d076e --- /dev/null +++ b/zk/DRAM_and_SRAM_memory.md @@ -0,0 +1,9 @@ +--- +title: DRAM_and_SRAM_memory +tags: [memory] +created: Friday, July 12, 2024 +--- + +# DRAM_and_SRAM_memory + +## Related notes diff --git a/zk/Memory_addresses.md b/zk/Memory_addresses.md index 2251830..5b446b7 100644 --- a/zk/Memory_addresses.md +++ b/zk/Memory_addresses.md @@ -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 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). 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 -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: diff --git a/zk/Reducing_fractions.md b/zk/Reducing_fractions.md index 2fbf00e..427253c 100644 --- a/zk/Reducing_fractions.md +++ b/zk/Reducing_fractions.md @@ -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: $$ -\\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 diff --git a/zk/VirtualMemory.md b/zk/VirtualMemory.md index 2993e42..704ccd4 100644 --- a/zk/VirtualMemory.md +++ b/zk/VirtualMemory.md @@ -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 the appportioning of virtual memory. Confused. -![](/img/virtual-memory-diagram.jpg) +![Virtual memory diagram](/img/virtual-memory-diagram.jpg) diff --git a/zk/What_is_memory.md b/zk/What_is_memory.md new file mode 100644 index 0000000..f5ad72d --- /dev/null +++ b/zk/What_is_memory.md @@ -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