Search code examples
cpucpu-architecturecpu-registersprocessorcpu-cache

How a 4 bit CPU Works on infinite data and recall that data from memory?


Consider, a processor with only 4 transistors. It can represent only one nibble at a time. we need to work on data consist of 32bits (correction: i removed "infinite bytes" from here). how it can save? so that we input second nibble and so on.... and how we recall saved data? and also explain when we represent binary to octal or decimal, which cpu unit do this representations?


Solution

  • If your data is literally infinite like a true Turing machine, you need to be able to use variable-sized addresses. Or some way to move along a tape in a potentially-infinite number of finite steps. i.e. use storage that you can do relative seeks on, instead of every storage location even having an address.

    No existing RAM-based CPUs do that; they always pick a fixed finite address width. e.g. 8-bit, allowing you to address up to 256 different memory locations.

    You can't pick fixed width = infinite because then you'd need an infinite number of transistors to build your CPU. (Instead of "just" an infinite amount of time to process infinite-sized problems, and finite time for finite-sized problems.)