4 ms·
> really Can't a CPU be emulated on anything having a representation of 1 bit or 0 bit?
by amts 4y ago
> really
Can't a CPU be emulated on anything having a representation of 1 bit or 0 bit?
- layer8 4y agoYou need a thing that actually does something with those zeros and ones. Like, process them. That’s called a processor. A CPU. Zeros and ones by themselves don’t do anything.
- amts 4y agoDo you mean that any time when, for example, some electronic circuits CAD software simulates the working of a logic "NOT" gate, it needs to actually access this logic gate circuit instance in the CPU?
- layer8 4y agoNo, but the data (zero and ones) representing the gates must be processed by the CPU for the emulation to take place. It’s the CPU that performs the emulation by processing that data. And the emulation is much slower than the actual electronic circuit. So if you want to emulate a CPU, you still need a real CPU that does the emulation, and the emulation will (usually) be slower than actually running the emulated CPU for real. For example, you can emulate an Intel CPU on an Apple CPU (or vice versa), but that emulation may be slower than if you had a real Intel CPU (or real Apple CPU) in the first place. In any case, you can’t emulate CPUs out of thin air, i.e. just with storage.
- amts 4y agoOf course it would be slower, but suppose time is not a priority while performing computations. CPU could start and stop the emulation, perform some memory management, but not the computation itself. Like, some type of linked list on an SSD, it would take a bit from an input cell, which is linked to a logical "NOT" cell, which will reverse this bit to zero (which is easy to just assume an opposite value), and send the result to the next linked "output" cell.
- navjack27 4y agoThe SSD isn't going to miraculously sprout a way to perform calculations on itself without something performing calculations on it itself. What is the "it" that you keep talking about that is taking a bit from an input cell? I mean okay, try to imagine that you could store some magical sequence of bits to a SSD that would signal to the SSD itself that it should be performing some sort of computation on this range of bits by just shifting them around. Now imagine how many bits in how many permutations are stored on all of the ssds in the world. Now ask yourself why this hasn't just miraculously happened.
- amts 4y ago"it" = some type of linked list. You can have the truth table, for example, for an "AND" gate be statically defined as 4 cells each for every possible result in the list (like 1 and 1 is 1, 1 and 0 is 0 etc). So when there's 1 and 1 in the input cells, the linked cell storing 1 is selected: basic if, else logic. Sort of, if all possible results of basic logic operations would be statically stored on an SSD, and the emulator would just select the needed one based in inputs. And these inputs could be just a data array stored in another place on an SSD. I am not asking myself why this hasn't just miraculously happened, but am sure that if enough physical logic elements of an SSD are emulated, this may provide venue for emulating basic computational operations.
- layer8 4y ago> the emulator would just select What is “the emulator” here? If it’s the original CPU, you’re just trading off some of its computing power to a slower, emulated CPU. For emulating a CPU, you don’t need a lot of storage, and it’s much faster to use main memory (RAM) instead of using SSD memory. What you need for emulating a CPU, however, is computing power, and only another CPU can provide that.
- amts 4y agoEmulator can be a program with some type of linked list, whose core can emulate computations, which may be stored on various types of memory. In some types of emergencies when all CPUs and RAMs are busy, it can be handy. Maybe part of computational operations (like comparisons) can be done by CPU. Truth tables are essentially the already computed results of basic AND/OR/XOR operations, so at least these operations may be emulated on a storage via selection of a predefined result of computation. But whatever (I hope I won't run out of functionality provided by 2 cores).