Registers and RAM: Crash Course Computer Science #6

Registers and RAM: Crash Course Computer Science #6

Introduction to Computer Memory

In this section, we will learn about computer memory and its importance in storing information for processing.

Building a Circuit to Store Information

  • Computer memory is essential for storing data and game progress.
  • Random Access Memory (RAM) stores data as long as the power stays on, while persistent memory can survive without power.
  • We will start by building a circuit that can store one bit of information and then scale up to build our own memory module.

Looping Circuits with OR Gates

  • Circuits can be created that loop back on themselves using feedback.
  • By feeding the output of an OR gate back into one of its inputs, we create a circuit that always outputs 0 when both inputs are 0.
  • Flipping one input to 1 changes the output to 1, but flipping it back to 0 does not change the output.

Recording Information with AND Gates

  • Using an AND gate instead of an OR gate allows us to record a 0 when both inputs are 1 and maintain that value even if one input changes.
  • Combining circuits with AND gates and OR gates creates an AND-OR Latch, which can store a single bit of information.

Gated Latch for Easier Use

  • Adding extra logic gates allows us to create a Gated Latch with a single wire for input data and a write enable line.
  • The Gated Latch can store a single bit of information and has the ability to write and read data.

Using Multiple Latches to Store Numbers

  • By combining multiple latches, we can create a register that can store multiple bits of information, such as an 8-bit number.

Conclusion

Computer memory is crucial for storing and retrieving data in computer systems. By understanding how circuits can be designed to store information using logic gates, we can build memory modules that enable more complex operations in computers.

Understanding Memory Organization

In this section, we learn about memory organization and how to optimize the use of wires in a computer system.

Latches and Wires

  • Latches are used to store data in memory.
  • Using latches side-by-side becomes impractical for a large number of bits due to the excessive number of wires required.
  • A matrix arrangement is introduced as a solution, where latches are arranged in a grid.
  • The row and column wires are used to activate specific latches.

Enabling Latches

  • An AND gate is used to enable a specific latch by ensuring that both the row and column wires are active.
  • This setup allows for significant wire savings as only one latch can be write enabled at any given time.

Reading Data

  • Only the write-enabled latch will save data, while others ignore values on the data wire.
  • A read enable wire can be used to retrieve data from a specific latch.

Addressing Latches

  • Each latch has an address defined by its row and column position in the matrix.
  • Multiplexers are used to convert addresses into signals that select the correct row or column.

Scaling Up Memory

This section explores scaling up memory capacity by organizing multiple memory components into larger arrangements.

Building 256-Bit Memory

  • A 256-bit memory component is created using 8 rows of 256-bit memory modules, allowing storage of an 8-bit number (byte).
  • The same address is fed into all 8 memory components simultaneously, with each component saving one bit of the number.

Uniform Bank of Addressable Memory

  • Instead of viewing individual memory modules, it's more practical to think of them as a uniform bank of addressable memory.
  • This approach allows for easy scalability as more memory locations are added.

Memory Capacity

  • The memory component created can store 256 bytes at 256 different addresses.
  • Modern computers achieve larger memory capacities by packaging smaller memory modules into larger arrangements.

Random-Access Memory (RAM)

This section explains the concept of RAM and its role in computer systems.

RAM Functionality

  • RAM, or Random-Access Memory, allows for accessing any memory location at any time and in a random order.
  • It serves as a computer's short-term or working memory, similar to how humans keep track of current information.

Addressing Memory

  • As the number of memory locations increases, the address size needs to grow accordingly.
  • To address a billion bytes of memory (gigabyte), 32-bit addresses are required.

RAM in Computer Systems

  • RAM is an essential component in modern computers and is used extensively for running programs and storing data.

Inside a Stick of RAM

This section provides a visual representation of the structure within a stick of RAM.

Structure of RAM Modules

  • A stick of RAM consists of multiple memory modules soldered onto a board.
  • Each module contains squares that further divide into smaller blocks, ultimately forming individual bits.

New Section Understanding RAM and Memory Technologies

In this section, the speaker discusses the concept of memory in computing and introduces different types of RAM technologies.

Introduction to Memory

  • RAM modules from the 1980s had a capacity of 1 megabyte, which is significantly less compared to modern RAM.
  • Today, it is possible to purchase RAM with gigabytes or even more memory, representing billions of bytes.

Types of RAM Technologies

  • SRAM (Static Random-Access Memory) is built using latches and is one type of RAM technology.
  • Other types include DRAM, Flash memory, and NVRAM. These technologies have similar functions but use different circuits to store individual bits.
  • Different logic gates, capacitors, charge traps, or memristors are used in these technologies.

Fundamentals of Memory Storage

  • All memory technologies store bits of information in nested matrices of memory cells.
  • The fundamental operation is relatively simple; however, the complexity arises from layers upon layers of abstraction.
  • This can be visualized as a Russian doll that keeps getting smaller and smaller.

Timestamps are provided for each section to help navigate through the video.

Playlists: Computer Science
Video description

Take the 2017 PBS Digital Studios Survey: http://surveymonkey.com/r/pbsds2017. Today we’re going to create memory! Using the basic logic gates we discussed in episode 3 we can build a circuit that stores a single bit of information, and then through some clever scaling (and of course many new levels of abstraction) we’ll show you how we can construct the modern random-access memory, or RAM, found in our computers today. RAM is the working memory of a computer. It holds the information that is being executed by the computer and as such is a crucial component for a computer to operate. Next week we’ll use this RAM, and the ALU we made last episode, to help us construct our CPU - the heart of a computer. *CORRECTION* In our 16x16 Latch Matrix graphic, we inadvertently left off the horizontal row access line above the top row of latches. As a result, the highlighted line for the row at address 12 should actually be one line higher. Produced in collaboration with PBS Digital Studios: http://youtube.com/pbsdigitalstudios The Latest from PBS Digital Studios: https://www.youtube.com/playlist?list=PL1mtdjDVOoOqJzeaJAV15Tq0tZ1vKj7ZV We’ve got merch! https://store.dftba.com/collections/crashcourse Want to know more about Carrie Anne? https://about.me/carrieannephilbin Want to find Crash Course elsewhere on the internet? Facebook - http://www.facebook.com/YouTubeCrashC... Twitter - http://www.twitter.com/TheCrashCourse Tumblr - http://thecrashcourse.tumblr.com Support Crash Course on Patreon: http://patreon.com/crashcourse CC Kids: http://www.youtube.com/crashcoursekids Want to find Crash Course elsewhere on the internet? Facebook - http://www.facebook.com/YouTubeCrashC... Twitter - http://www.twitter.com/TheCrashCourse Tumblr - http://thecrashcourse.tumblr.com Support Crash Course on Patreon: http://patreon.com/crashcourse CC Kids: http://www.youtube.com/crashcoursekids