# The mind-body problem for computers

1. May 2, 2017

### ShayanJ

Last night somebody asked an interesting question. He said what's the solution to the equivalent mind-body problem for computers? How is computer software related to the computer hardware? So I explained about how computer hardware interprets voltages below and above some value as 1s and 0s and then how we build the assembly language over the top of those 1s and 0s and high level languages over the top of assembly and then we build operating systems to manage hardware resources for us and any software then just deals with the operating system. But now I have a question myself. If we give a computer a series of 1s and 0s, how are those 1s and 0s in a text file(I assume!), gets translated to a series of voltage oscillations? I'm not quite sure how to express this but hopefully someone can explain things clearly anyway.
Thanks

2. May 2, 2017

### phinds

Text characters are represented in binary (generally ASCII) and those are handled exactly the same way instructions are. They are stored in, and manipulated by, electronic devices (mainly transistors for manipulation and magnetic material for bulk storage). Physically, data and instructions are indistinguishable.

3. May 2, 2017

### Staff: Mentor

Which brings up how computers "know" what they get from a bit stream? One answer is metadata. Fixed short stream of bits that labels what the following bit stream is all about - data, instructions, flavors of it. An example is the so-called UNIX magic. An example command that shows this is the file command:
From cygwin (Linux that runs under windows) on this same box:
Code (Text):

Owner@Owner-PC ~
$file t.shl t.shl: ASCII text Owner@Owner-PC ~$ file prime.exe
prime.exe: PE32+ executable (console) x86-64, for MS Windows

4. May 2, 2017

### Staff: Mentor

This is pretty good intro to how computers work complete with pictures?

https://www.amazon.com/How-Computers-Work-9th-White/dp/0789736136

and here's another detailed description:

and low level hardware description at the electron level:

I'm unable to find an excellent soup to nuts explanation though that isn't a book.

What often makes this difficult is that computers provide so many conveniences we don't recognize them as such. As an example, at even the lowest-level, we can write programs in using the front panel switches of a classic micro like the MITS Altair 8080. However, even then the computer is running a monitor program looking at the switch settings and copying them to the specified memory location.

Otherwise you'd have to place your code in a ROM chip following the micro CPU's conventions of what it will do and where it will look for the first instruction when you turn it on, insert the ROM in your micro and turn the micro on. This is what early micro programmers did. Eventually things improved where you can code in assembler and then higher level languages with the machine transforming your program into code and storing it in memory.

http://www.vintage-computer.com/altair8800.shtml

and some history here:

Last edited by a moderator: May 8, 2017
5. May 2, 2017

### Khashishi

In synchronous computing, the basic elements are flip flops and gates. You also have a master clock which is a square wave oscillator which is connected to every flip flop. A flip flop basically takes a voltage (which can be either "high" or "low", for 1 and 0) as input and sends it to the output after it receives a trigger from the clock signal. Flip flops are also called registers, and they act as short term memory. Gates take inputs (high or low voltage) from one or more flip flops or other gates and do some calculation and output a voltage which can go into another gate or flip flop.

In a programmable computer, you have multiplexers which select which inputs go to which gates or flip flops. And the multiplexers are controlled with voltages which could come from other gates or flip flops. So you can do pretty much any calculation.

In a microprocessor, the voltages that go into the main routing multiplexers come from a special part of memory (which is basically a big block of flip flops) dedicated to instructions. The memory is loaded with a set of instructions called code. Note that you don't need a microprocessor to compute things. Many simple computing tasks in equipment are handled by FPGAs, which are programmable computers without microprocessors. I think that the human brain is a little more like an FPGA than a microprocessor, since the brain operates more in parallel and doesn't follow a sequential set of operations.

6. May 2, 2017

### Staff: Mentor

THis looks like a great video on how the computer works: