User Name
Password
AppleNova Forums » General Discussion »

How do these computers work


Register Members List Calendar Search FAQ Posting Guidelines
How do these computers work
Page 1 of 2 [1] 2  Next Thread Tools
liam
Member
 
Join Date: Apr 2005
Location: Maidenhead - UK
Send a message via AIM to liam  
2005-06-08, 07:09

I have often wondered what the base level of interface between humans and computers is. My dad's old pal (now dead) worked on a very early Ferranti computer in Manchester (he said it was the first ??). Anyway he said (as I remember it) that during the war radar operators spotted that certain images were difficult to get rid of from their scopes. This gave someone the idea of using this glitch as a way of storing information. Now that I understand, and it is probably not on point. What foxes me is how you turn human instructions into electronic instructions. I mean how does the programming language or code actually push the computer to do something at what must be a subatomic level? What translates words on the screen into electrons flying around in a bit of silicon or copper wire. Does that make sense? Sorry if this is a stupid question but when I look into it, people only seem to explain coding and that seems to miss out a stage. Or am I just stupid ?
  quote
ghoti
owner for sale by house
 
Join Date: Apr 2005
Location: Charlotte, NC
 
2005-06-08, 07:27

That's a very good question. Let's see if I can shed some light on this.

All that happens in a computer is simply electricity. When you press a key on your keyboard, or move your mouse, electrical impulses are sent to the computer. There, they are translated into other eletrical impulses several times, and eventually end up in the CPU. What happens there is basically just electricity again, which at some point results in the right impulses getting sent to the graphics card, which then passes them on to your screen, where you see the character you just typed.

All instructions in a program (I'm assuming you know what a programming language is, but I can explain if you don't) also get translated into electricity at some point, and thus steer what the CPU and other parts of the computer do with the impulses passing through them.

On the level of single impulses, a computer is way too complex to understand. This is why there are many levels of abstraction that allow us to build and program these machines. The CPU, for example, is usually described as consisting of several big parts dealing with different kinds of instructions, which in turn consist of smaller blocks, until you get down to the level of single transistors. But it doesn't stop there, of course.

For the sake of programming or using a computer, a relatively high-level description is usually sufficient. But there are many, many levels below that, which we tend to ignore, and leave to other people to worry about (the guys at Intel, for example ).

I hope this makes some sense ...
  quote
liam
Member
 
Join Date: Apr 2005
Location: Maidenhead - UK
Send a message via AIM to liam  
2005-06-08, 07:49

That's great but what really bakes my noodle (apols to Matrix fans) is how that chap (forgot his name) managed to copme up with C. I mean that must have been working at all those different levels no ? And to make it work with a compiler so it could work on different types of machine (good god that's way too smart for me to even think about)
  quote
ghoti
owner for sale by house
 
Join Date: Apr 2005
Location: Charlotte, NC
 
2005-06-08, 08:04

You're probably referring to Kernighan and Ritchie. They also only worked on some of the levels, not all of them. They didn't need to design their own processor or RAM bus, for example, but built their language on top of the assembly language of the CPU they were using.

A high-level language is translated to assembly or machine language (assembly is simply the human-readable form of machine language) by the compiler. Most processors have a very similar set of basic instructions - basic arithmetic, comparison of values, conditional jump, etc. -, so it's not that hard to design a language that will compile on all of them (using specific compilers for each, though). The hard part is making things fast, and also interfacing with the operating system and peripheral components, which can be very different.
  quote
liam
Member
 
Join Date: Apr 2005
Location: Maidenhead - UK
Send a message via AIM to liam  
2005-06-08, 08:08

That's is pretty brain boiling stuff to me Ghoti, it's kind of a shame us home users are not more educated about it all. It's really interesting but pretty daunting. I'll have to satisy myself with learning applescript I think.
  quote
Gargoyle
http://ga.rgoyle.com
 
Join Date: May 2004
Location: In your dock hiding behind your finder icon!
 
2005-06-08, 08:10

To expand on ghoti's comments, at the lowest level a computer works with two states - On or Off. Some clever people discovered that by grouping switches together, they were able to make what is known as "logic gates". These being NOT, AND, and OR (others are also made from combinations of these first 3). These gates are the start of any computer operation!

As you may or may not know, a chip (Intel, IBM, nVidia or ATI) is just a group of switches (transistors) in special configurations. The more transisters you can fit on the chip the more logic gates you can have, the more logic gates you have the more complicated "instructions" you can perform.

A very basic example (I think I covered this in high school computing) is the "half adder" and "full adder" circuits which will "add" up those pulses ghoti was talking about! (clickity-click)

Note If you are really planning on getting your head round this, then you will need to learn how to count in base 2 (binary).

When we count, we write numbers in columns of 10. Starting with the units column (0-9) as column 1, then every column to the left is 10 to the power of the column number:
eg. 1000's, 100's, 10's, 1's.
So we write 12, as 1 bunch of 10's plus 2 bunches of 1's. (12)

When a computer counts, it only knows two states - On and Off (1 and 0) so each column to the left is a power of two:
eg. 8's, 4's, 2's, 1's.
So a computer writes 12 as 1 bunch of 8's plus 1 bunch of 4's (1100)

Hope this has'nt fried your brain too much!

OK, I have given up keeping this sig up to date. Lets just say I'm the guy that installs every latest version as soon as its available!

Last edited by Gargoyle : 2005-06-08 at 08:53.
  quote
liam
Member
 
Join Date: Apr 2005
Location: Maidenhead - UK
Send a message via AIM to liam  
2005-06-08, 08:15

I think the problem for me is that I was educated at a pretty run down school in the north of England, we had one Research Machines PC shared between 1000 kids. I think I got to look at it once. So I suppose I, like a lot of my generation, just missed out on getting a grounding in the basics. Thanks for the explanations I am finding them very interesting indeed
  quote
Brad
Selfish Heathen
 
Join Date: May 2004
Location: Zone of Pain
 
2005-06-08, 08:27

You know, I had started to write up my own explanation about compilers, but then I realized Kickaha would do a much more elegant and complete job if he catches wind of this thread. Long story short, compilers are actually pretty simple; they just break down the large blocks of human-readable code into groups of individual commands and then translates those lines into machine-readable "assembly" code.

In the mean time, I suggest reading the following two HowStuffWorks.com articles (in the order below). HSW does a good job of explaining technical things like this in plain english; so, these should make the whole situation seem a bit less mysterious.

1. How Boolean Logic Works
2. How Microprocessors Work

The quality of this board depends on the quality of the posts. The only way to guarantee thoughtful, informative discussion is to write thoughtful, informative posts. AppleNova is not a real-time chat forum. You have time to compose messages and edit them before and after posting.
  quote
ghoti
owner for sale by house
 
Join Date: Apr 2005
Location: Charlotte, NC
 
2005-06-08, 08:30

Liam, don't worry, it takes people years to understand all that - and it would take equally long to explain here. You may want to try and get a book that introduces you to some basic programming. It's really not very hard to write a small program that does something simple (like letting you play hangman or something), even without a lot of knowledge. If you're still interested, you can go on from there. It's not like you can't learn something new, even if you didn't hear about it much in school

Gargoyle, you did a great job there. I guess I was a bit too abstract in my rambling about abstractions ...
  quote
liam
Member
 
Join Date: Apr 2005
Location: Maidenhead - UK
Send a message via AIM to liam  
2005-06-08, 08:39

The how stuff works articles are very good. The whole thing is mind blowing really. I take it for granted but thinking about it even the idiot's guide to logic gates is pretty clever stuff, and if I even try to think what was going on inside an ancient chip my brain gives up a bit. The past 30 years or so have been really remarkable: when I was 15 there was a huge black box sat on a teacher's desk that displayed some simple patterns on a black and white screen and very little else it seemed. Now, just 20 years later, I am sat in my garden spouting (wirelessly) nonsene from a cute little iBook which is being inflicted by some other amazing process on people all around the world. Wow.
  quote
liam
Member
 
Join Date: Apr 2005
Location: Maidenhead - UK
Send a message via AIM to liam  
2005-06-08, 08:45

Ghoti all the posts have been great. Your explanation of pressing a key and sending an electrical signal was what I needed to hear - I mean that's kind of it at the base level I suppose. What I am failing to take account of is that all these huge tech companies with divisions of engineers and scientists have all been embroiled in massively complex work that amplifies that very basic idea. The truth no doubt is that it might not really be possible for a layperson, or even a pretty technically adept person to understand the whole thing. Computers as we see them today must be the product of many millions of hours of research.
  quote
liam
Member
 
Join Date: Apr 2005
Location: Maidenhead - UK
Send a message via AIM to liam  
2005-06-08, 09:01

Oh and something I forgot to say about my dad's old pal, he was a student of (or worked for a long time with) Alan Turing. He had the brain of a small planet, but said he was very dim when compared to Turing.
  quote
Brad
Selfish Heathen
 
Join Date: May 2004
Location: Zone of Pain
 
2005-06-08, 09:16

Quote:
Originally Posted by liam
What I am failing to take account of is that all these huge tech companies with divisions of engineers and scientists have all been embroiled in massively complex work that amplifies that very basic idea. The truth no doubt is that it might not really be possible for a layperson, or even a pretty technically adept person to understand the whole thing.
Bullocks! I hate to beat that horse again, but... remember that it's all just about abstraction! If you can keep that one idea in mind, it all becomes much easier to understand.

A team of software engineers, for example, will never entirely design an operating system or even a moderately-sized application from the ground up. All software development is broken down into parts, made into a hierarchy to simplify the whole process.

Let's look at an operating system, for example. Daunting, huh? Not really!

At the lowest level, we have a team writing the kernel, the most basic piece of the system. These engineers create a series of commands that perform very basic memory and process management and that send basic instructions to hardware components. These commands are then available to be used by other engineers.

At the next step up, driver engineers use those commands to create new commands that tell the computer how to do slightly more complex tasks like how to change a pixel on your screen to a certain color or how to access bits on a disk.

At the next level, engineers who implement features in the OS use those commands to create new commands that tell the computer how to do slightly more complex tasks like how to draw whole shapes on the screen or how to read and save an entire file on a filesystem.

At a couple more levels up, you'll find very human-readable programming. You reach a point where you can literally just say "create a window in the middle of the screen big enough to fit this picture." As an engineer, you don't have to know how that window is being created. You're just given a createWindow() command and it just works.

So, as you keep going up the abstraction hierarchy, seemingly impossible tasks become incredibly easy to implement because each command breaks down into a smaller series of commands which each break down into a smaller series of commands and so forth until all you have are those itty-bitty assembly instructions that the CPU then translates into the various binary operations (AND, OR, XOR, adders, and so forth mentioned by the previous posters).

Does that help at all?

The quality of this board depends on the quality of the posts. The only way to guarantee thoughtful, informative discussion is to write thoughtful, informative posts. AppleNova is not a real-time chat forum. You have time to compose messages and edit them before and after posting.
  quote
liam
Member
 
Join Date: Apr 2005
Location: Maidenhead - UK
Send a message via AIM to liam  
2005-06-08, 09:21

Brad - it does !!!! Although it seems that windows (crosses himself) was put together by people like me and mac's os by people like you.
  quote
Brad
Selfish Heathen
 
Join Date: May 2004
Location: Zone of Pain
 
2005-06-08, 09:24

PS. I was editing my post while you were reading it. You might want to skim over it again in case I added anything new.

I'm quite glad I was able to help too. I take pride in finding ways to explain the techie computer stuff to non-techie folks. I figure if I can explain things like this to my mother, of all people, then I'll be able to explain them to the higher-ups when I claim that I need another $100,000 for R&D.
  quote
ghoti
owner for sale by house
 
Join Date: Apr 2005
Location: Charlotte, NC
 
2005-06-08, 09:31

Quote:
Originally Posted by Brad
I figure if I can explain things like this to my mother, of all people, then I'll be able to explain them to the higher-ups when I claim that I need another $100,000 for R&D
Except that they won't ask you for technical explanations, but what your great new gizmo/program will do for the shareholders ...
  quote
Brad
Selfish Heathen
 
Join Date: May 2004
Location: Zone of Pain
 
2005-06-08, 09:34

Too true.
  quote
liam
Member
 
Join Date: Apr 2005
Location: Maidenhead - UK
Send a message via AIM to liam  
2005-06-08, 09:35

In a way one of the successes of computing is the fact that people like me can get along quite nicely with their computers without being technical. I have a wireless network, share files between my macs with ease, edit films, write to odd bit of music and even try a little bit of applescript here and there: all this without being at all mathematically, technically or logically inclined.

Last edited by liam : 2005-06-08 at 09:41.
  quote
thuh Freak
Finally broke the seal
 
Join Date: May 2004
 
2005-06-08, 09:41

its pretty interesting how all the abstractions play together in perfect harmony. if you try to think of the details to how it works, but you are looking at a huge picture, its going to be really difficult. the trick is breaking a big problem into many, many, many small but relatively easy to understand problems. a lot of the time, when its still too hard to understand, you haven't broken it down enough. like when i was explaining programmatic game collision detection to my friend, "well, we don't actually know when two complex objects are colliding. but if we can break down every complex objects into a series of simple shapes {squares, polygons, ...}, and then break those shapes into a series of triangles, we do have mathematical formulas to tell us when triangles intersect. we aggregate all those calculations and thus complex collision detection is borne." the actual formulas themselves are pretty tough to look at, but again, breaking them down further, makes it all the easier.
  quote
ghoti
owner for sale by house
 
Join Date: Apr 2005
Location: Charlotte, NC
 
2005-06-08, 09:47

Computers are, indeed, amazing. And once you add the Internet, it's actually hard to believe that you can actually do all those things - and with such ease!

But there are also many other devices that we use all the time, and where we don't care at all or even know about their inner workings. Think of a car, for example. You only really have a very small set of controls, and all you're usually interested in is that they do what they're supposed to. But the fact that many modern cars contain very complex, distributed computer systems, is quite well hidden, and many people will never know it. It doesn't matter if your car is supermodern or 20 years old, you have the same abstracted user interface that will allow you to get from one place to the other. And few of us would be able to build a working car, or even explain all the little things (do you know how much gasoline you have to mix with how much air to get a proper ignition?) involved in doing so. Same with computers
  quote
Gargoyle
http://ga.rgoyle.com
 
Join Date: May 2004
Location: In your dock hiding behind your finder icon!
 
2005-06-08, 10:00

Good example ghoti, my car for example has an accelerator pedal, just like every other car - but unlike others I do not have a physical accelerator cable connected to the fuel body! Mine is a digital pedal connected to a computer which decided how much the engine should accelerate!

OK, I have given up keeping this sig up to date. Lets just say I'm the guy that installs every latest version as soon as its available!
  quote
liam
Member
 
Join Date: Apr 2005
Location: Maidenhead - UK
Send a message via AIM to liam  
2005-06-08, 10:10

I don't want to get too far off topic but jet engines are another example of amazing technology. They produce huge amounts of power, work for many thousands of hours on end have amazingly few parts, oh yeah and are now controlled, you guessed it, by a computer.
  quote
liam
Member
 
Join Date: Apr 2005
Location: Maidenhead - UK
Send a message via AIM to liam  
2005-06-08, 10:11

"like when i was explaining programmatic game collision detection to my friend, "well, we don't actually know when two complex objects are colliding. but if we can break down every complex objects into a series of simple shapes {squares, polygons, ...}, and then break those shapes into a series of triangles, we do have mathematical formulas to tell us when triangles intersect. we aggregate all those calculations and thus complex collision detection is borne."


Now I know why I went into something as simple as law and why I sat at the back of the class during maths.
  quote
Brad
Selfish Heathen
 
Join Date: May 2004
Location: Zone of Pain
 
2005-06-08, 10:23

Quote:
Originally Posted by liam
Now I know why I went into something as simple as law and why I sat at the back of the class during maths.


I like this guy. He's funny.
  quote
ghoti
owner for sale by house
 
Join Date: Apr 2005
Location: Charlotte, NC
 
2005-06-08, 10:28

Heh, that's what I thought too
  quote
liam
Member
 
Join Date: Apr 2005
Location: Maidenhead - UK
Send a message via AIM to liam  
2005-06-08, 10:33

Law is like falling off a log compared to this stuff: lots of people lie and nearly everyone's greedy.

Last edited by liam : 2005-06-08 at 10:38.
  quote
spotcatbug
Veteran Member
 
Join Date: May 2004
Location: Clayton, NC
 
2005-06-08, 11:21

Quote:
Originally Posted by liam
Now I know why I went into something as simple as law and why I sat at the back of the class during maths.
After I talk to a friend of mine who happens to be a lawyer, I remember why I went into something as simple as comp. sci.
  quote
Banana
is the next Chiquita
 
Join Date: Feb 2005
 
2005-06-08, 11:55

Figured this would be a good place to put in my -$.02 here.

I have understood that computers uses 0s and 1s (on/off) along with logic gate to process and organize information. I have always wondered why this hasn't changed lately. I'm sure there are technology available to make multiples states possible (Our DNA has four states, thus storing/processing much more information per unit), and think it has to do with logic gates. Shouldn't it be possible for us to create a system of gates that can process more than two states and thus execute considerably complex instruction in same time as two states machine?
  quote
Brad
Selfish Heathen
 
Join Date: May 2004
Location: Zone of Pain
 
2005-06-08, 12:15

Quote:
Originally Posted by Banana
Shouldn't it be possible for us to create a system of gates that can process more than two states and thus execute considerably complex instruction in same time as two states machine?
Ah! That's where quantum computing enters the fray.

Classical systems can only differentiate 0 (low voltage) and 1 (high voltage). Quantum systems have a special "qubit" that can actually have both states at the same time, thereby offering the possibility of three states. Quantum logic gates are a whole different beast and work a bit differently than traditional logic gates, though.

The quality of this board depends on the quality of the posts. The only way to guarantee thoughtful, informative discussion is to write thoughtful, informative posts. AppleNova is not a real-time chat forum. You have time to compose messages and edit them before and after posting.
  quote
Kickaha
Veteran Member
 
Join Date: May 2004
 
2005-06-08, 12:29

*ahem*

Brad, you ignorant slut.

Quantum computing is *not* just three state logic. That's been done (1950s, Russia). Quantum computing is a lot more than that.

Say you have two qubits, and you're working under Brad's explanation. Let's mark the states 0, 1, and *. The possible states are:
00, 01, 10, 11, 0*, *0, 1*, *1, **

Simple three state logic.

Qubits are a little more than that however. A qubit in an indeterminate state * isn't just in a different state, it's in *ALL* states *SIMULTANEOUSLY*.

Computing with a superposition qubit is the same as making two computations, one with a 0, and one with a 1, *at the same time*. So if you had * + 000, you'd get 00*, representing both 000 and 001 simultaneously.

So with four qubits, you get 2^4 computations being performed in one operation. With ten qubits, 2^10 computations. With twenty qubits, 2^20, and so on.

Notice that with 20 'bits', you're performing over a million computations in one cycle. Slight speed increase.

This is what trinary logic was trying to do, but simply couldn't - the mathematical logics can be worked out, but they can't be implemented in the physical world effectively without using quantum effects. Also, with trinary logic, when you get a '*', it's simply a '*'. You still don't know if it's a 0 or a 1. With quantum computing, you *can* tease out actual information from the superposition, collapsing the state into one or the other, and have it be the right answer automagically.

Last edited by Kickaha : 2005-06-08 at 12:35.
  quote
Posting Rules Navigation
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Page 1 of 2 [1] 2  Next

Post Reply

Forum Jump
Thread Tools
Similar Threads
Thread Thread Starter Forum Replies Last Post
dealing with parents who just don't know as much as you about computers... .Hack AppleOutsider 14 2005-03-16 23:45
Connecting To the Net at work Phoenix Genius Bar 7 2005-03-07 08:29
Home Wireless Network: Will This Work? Chinney Genius Bar 6 2005-02-12 14:50
Watching TV @ Work autodata AppleOutsider 6 2004-10-11 16:24
A Safe and Happy 4th to my American brethren. Moogs AppleOutsider 6 2004-07-04 17:01


« Previous Thread | Next Thread »

All times are GMT -5. The time now is 08:03.


Powered by vBulletin®
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004 - 2024, AppleNova