8 Replies - 1253 Views - Last Post: 30 June 2014 - 03:41 PM

#1 Atharron  Icon User is offline

  • D.I.C Head

Reputation: 2
  • View blog
  • Posts: 54
  • Joined: 23-April 14

How does a computer do what it does?

Posted 21 June 2014 - 04:28 PM

So I was watching a video on YouTube today comparing the inner workings of the PS4 and Xbox One and it got me thinking.

I'm beginning to understand how programming works: you tell the computer to do something, it does it, if something happens, do this, or else do another thing, then do something else according to some other instructions. But it still feels like you're writing a recipe. The languages (or at least the ones I've encountered; correct me if I wrong) are merely tools made by humans to interpret human thought into computer thought, synapses to bytes. But when you type that if command, when you fill in that variable, when you define that function, how does the computer know what to do? Furthermore, how does it translate that into the images you see on the screen? How does it manipulate the electricity into Angry Birds?

I saw once a very effective video from Computerphile that kinda explained this using dominos, but I wanted to know more than the vid showed me.

So does anyone know the answer to this? Or can you point me to a site that could tell me (I don't even know what to Google for the answer). I'm not sure whether this knowledge can be useful later down the line, but I'm just curious at the moment.

Is This A Good Question/Topic? 0
  • +

Replies To: How does a computer do what it does?

#2 macosxnerd101  Icon User is online

  • Self-Trained Economist
  • member icon




Reputation: 10596
  • View blog
  • Posts: 39,259
  • Joined: 27-December 08

Re: How does a computer do what it does?

Posted 21 June 2014 - 04:37 PM

How is your math? You really need quite a bit of math and a strong proof writing background to delve into this. At the lowest levels, computers utilize electrical and combinatorial circuits to evaluate functions. Those are low level. An abstraction layer that will give you more insight is automaton theory. Given an input string, what tools do computers use to evaluate them? That's the basis of automaton theory. The most general automaton is the Turing Machine. It takes quite a bit of theory to appreciate them, though.
Was This Post Helpful? 0
  • +
  • -

#3 Atharron  Icon User is offline

  • D.I.C Head

Reputation: 2
  • View blog
  • Posts: 54
  • Joined: 23-April 14

Re: How does a computer do what it does?

Posted 21 June 2014 - 04:59 PM

I'm not that interested in learning everything (at the moment anyway), I just want a basic idea of it. I know a computer basically uses switches that either allow the current to run through it or not which can be either physical switches like in the old days, or these new fangled ones made out of only a relatively few atoms. I kinda remember us doing something at school about this using simple circuit boards, but as with much of that I either didn't pay attention or forgot it because it didn't interest me back then.

I'm not even entirely sure I'm wording the question right.
Was This Post Helpful? 0
  • +
  • -

#4 macosxnerd101  Icon User is online

  • Self-Trained Economist
  • member icon




Reputation: 10596
  • View blog
  • Posts: 39,259
  • Joined: 27-December 08

Re: How does a computer do what it does?

Posted 21 June 2014 - 05:38 PM

How well do you understand programming? Have you gone through a data structures and algorithms class where you write code? What about a computer architecture/systems class? There are various ways you could attack this. You could take the low-level route and investigate using assembly language and combinatorial circuits. You could take the math route and look at automaton and computability theory. You could bulk up on your programming.

At the end of the day, a computer is a device that takes a string input and determines whether or not it belongs to a language. These languages are low-level constructs for problems. A Turing Machine is a device which accepts a string on a tape head. As it evaluates the string, it moves the tape head either left, right, or not at all; and possibly writes to the tape. It either accepts the string, rejects the string, or fails to halt. In essence, a Turing Machine is a minimal computer.
Was This Post Helpful? 0
  • +
  • -

#5 tlhIn`toq  Icon User is offline

  • Please show what you have already tried when asking a question.
  • member icon

Reputation: 5540
  • View blog
  • Posts: 11,868
  • Joined: 02-June 10

Re: How does a computer do what it does?

Posted 21 June 2014 - 06:14 PM

I'm generally opposed to saying "Have you tried Googling it?" but in this case...
You say you don't really what to learn anything, but you want a general understanding of how computers work? Well... which is it? You want to learn something or you don't?

That's not me being snotty... That's how computers work. Binary. Yes or no. Do or do not. Everything they do is built on that. Piled on top of. Graphics are just visual representations of addresses in memory. A screen pixel is on or off. Its green if green is on and red and blue are off. Expand on top of that for a larger graphic because its just a matrix of pixels, which at a lower level is just a bunch of memory addresses that at a low enough level is a bunch of 1's and 0's.

https://www.google.c...a+computer+work
Was This Post Helpful? 0
  • +
  • -

#6 jon.kiparsky  Icon User is online

  • Pancakes!
  • member icon


Reputation: 7807
  • View blog
  • Posts: 13,203
  • Joined: 19-March 11

Re: How does a computer do what it does?

Posted 21 June 2014 - 08:28 PM

The trouble is, there are so many ways we could understand this question, it's really impossible to give you even a good "look here" answer.

One way to find an answer is a sort of a greedy algorithm: go to a library and browse the computing section for likely-looking titles. Limit yourself to the three most-likely candidates (you can go back for more if you want). Read the books. Every time you come to a concept that you think would be useful to understand in greater depth, make a note of it. When you have finished those three books, pick the three concepts that seem like the most likely next-stop items, and go back to the library. After a few iterations of this, you'll have an idea of the territory, and you'll be able to prune your search a little - maybe you'll find an interest in low-level programming, and you'll get into assembly and stuff, or else maybe you'll get off into OS design and implementation, or maybe it'll be computability and more theoretical areas that grab your attention. Whatever it is, satisfy that curiosity, and continue to write down those areas of ignorance that seem productive. Whenever you exhaust your search space, return to your ignorance list and follow a different path.

Repeat until dead. You will never run out of ignorance, and you will never be bored ever again in your life.

Some potentially useful titles:

Charles Petzold: Code - good introduction to logic of circuits. Written to a lay audience, so pretty comprehensible.
Andrew Tanenbaum's textbooks on operating systems and networking are well-regarded. (and Tanenbaum famously inspired/aggravated Torvalds, so that's interesting)
There are a few books on the design of Unix, which tend to be pretty hard going, but the OS view is actually a really interesting one for your question, so it's worth looking at one or two. Bach's Design Of the Unix Operating System is old, but effective.

But these are just a few possible starting points. There is no endpoint.


Quote

I'm generally opposed to saying "Have you tried Googling it?" but in this case..


On broad subjects like this, I see little point in asking the google. Wikipedia might have something worth while, but that'll be the vaguest sort of a start. You want depth here, not blog entries. Hie thee to a library!

This post has been edited by jon.kiparsky: 21 June 2014 - 08:32 PM

Was This Post Helpful? 2
  • +
  • -

#7 astonecipher  Icon User is offline

  • Major DIC Head
  • member icon

Reputation: 705
  • View blog
  • Posts: 3,036
  • Joined: 03-December 12

Re: How does a computer do what it does?

Posted 21 June 2014 - 08:53 PM

Screw a regular library, try here...

Library link I put in.
Was This Post Helpful? 0
  • +
  • -

#8 Atharron  Icon User is offline

  • D.I.C Head

Reputation: 2
  • View blog
  • Posts: 54
  • Joined: 23-April 14

Re: How does a computer do what it does?

Posted 22 June 2014 - 01:38 AM

View Postjon.kiparsky, on 21 June 2014 - 08:28 PM, said:

Charles Petzold: Code - good introduction to logic of circuits. Written to a lay audience, so pretty comprehensible.
Andrew Tanenbaum's textbooks on operating systems and networking are well-regarded. (and Tanenbaum famously inspired/aggravated Torvalds, so that's interesting)
There are a few books on the design of Unix, which tend to be pretty hard going, but the OS view is actually a really interesting one for your question, so it's worth looking at one or two. Bach's Design Of the Unix Operating System is old, but effective.

But these are just a few possible starting points. There is no endpoint.


Thanks. I've taken a look at Code and it seems just what I was after.

Quote

On broad subjects like this, I see little point in asking the google. Wikipedia might have something worth while, but that'll be the vaguest sort of a start. You want depth here, not blog entries. Hie thee to a library!


Ha, while I like my library, the computer section is made up of three shelves and is populated mainly by books to teach you how to use computers. The only programming help significantly represented was HTML/CSS and C. No books on the history of computing. It's a bit disappointing really, but I've found a couple books to be useful for learning to programme and I plan to buy a few others in the same series. But I will definitely get Code. I think that's what I was trying to ask, about the history of the medium and how it evolved from switching wires over to different sockets, and how that relates to what we have today.

This post has been edited by Atharron: 22 June 2014 - 01:39 AM

Was This Post Helpful? 0
  • +
  • -

#9 ben255  Icon User is online

  • D.I.C Regular

Reputation: 24
  • View blog
  • Posts: 271
  • Joined: 09-September 13

Re: How does a computer do what it does?

Posted 30 June 2014 - 03:41 PM

my knowlage is that. What makes a computer? well the memory and processor the rest is just IO on the bus to handle that data. data on the memory is stored, in 1,2,4,8 byte(byte, halfword, word, doubleword) some store everything in words. depending on the processory. the processor takes a chunk of data at a time from the memory into the cache(this is to handle preformance issues) since the distance the data has too travel from the memory is to long and the processor works to fast for it to get new data before its done with its current instruction. then it comes to the accual data one word adress is 32 bit. like 16 bit is the accual data, 8 bit is the instruction you want the processor to do, add the two data samples or compare etc etc.. there are some flag bits and stuff cant remeber all that good. 64 bit processors work with 8 byte adresses. 32 with 4 byte. no idea how it does with 1 byte and stuff never gone much into this.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1