Home | Community | Message Board


Sporeworks
Please support our sponsors.

Community >> The Pub

Welcome to the Shroomery Message Board! You are experiencing a small sample of what the site has to offer. Please login or register to post messages and view our exclusive members-only content. You'll gain access to additional forums, file attachments, board customizations, encrypted private messages, and much more!

Jump to first unread post. Pages: 1
OfflineLimelight
IntrepidTraveler
Male

Registered: 04/06/05
Posts: 791
Last seen: 7 years, 7 months
How do computers work?
    #4648233 - 09/12/05 12:16 AM (11 years, 6 months ago)

I was walking and talking about memories and stuff with my friend, and then he asked how computers work at their basic core. i thought it wasnt a big deal, but now i just got stoned out of my mind, and im thinking about it, and its really messing with my head.
How does something go from analogue to digital? Like i realize it's switches that produce different energy impulses, but how do you write the first program to _interpret_ those energy signals, when those signals are just more enrgy??


--------------------
"The worst mistake that you can make is to think you're alive when really you're asleep in life's waiting room."


Edited by Limelight (09/12/05 12:16 AM)


Post Extras: Print Post  Remind Me! Notify Moderator
OfflineLimelight
IntrepidTraveler
Male

Registered: 04/06/05
Posts: 791
Last seen: 7 years, 7 months
Re: How do computers work? [Re: Limelight]
    #4648237 - 09/12/05 12:16 AM (11 years, 6 months ago)

edited for stoned stupidness

edit again..


--------------------
"The worst mistake that you can make is to think you're alive when really you're asleep in life's waiting room."


Edited by Limelight (09/12/05 12:19 AM)


Post Extras: Print Post  Remind Me! Notify Moderator
Invisiblemantis
Male User Gallery

Registered: 01/26/03
Posts: 5,235
Loc: Bunker Alpha, GMC Flag
Re: How do computers work? [Re: Limelight]
    #4648369 - 09/12/05 12:43 AM (11 years, 6 months ago)

PM Seuss if you're REALLY interested in how computers work from the ground up. That guy knows his shit, the problem is you probably won't understand half of it-- unless you're an Electronics Engineering major or something :grin:


--------------------


Post Extras: Print Post  Remind Me! Notify Moderator
Invisiblemantis
Male User Gallery

Registered: 01/26/03
Posts: 5,235
Loc: Bunker Alpha, GMC Flag
Re: How do computers work? [Re: Limelight]
    #4648377 - 09/12/05 12:44 AM (11 years, 6 months ago)

Quote:

Seuss said:
It has been a while since my digital design classes, but I have built a computer from the transistor level up and I am fairly certain there is no alien technology involved.

A computer is a collection of switches that are either on or off. On is one, five volts (for example), and off is zero, or zero volts.

These switches can be combined to form logic gates. The three important ones are AND, OR, and NOT. Actually, AND and NOT are usually done with a single NAND gate... if you want a NOT, you just tie the two inputs together.

The simple logic gates above can be combined to form more complex logic such as XOR.

They can also be combined to create more complex components such as ADDERS and MULTIPLEXERS and LATCHES and FLIP-FLOPS, etc.

A latch for example, holds onto a value. If you combine 32 latches and tie their control lines together, you get a 32-bit REGISTER.... which can hold a 32-bit number. The number is stored base-2, or binary. It is trivial math to convert from base-2 to base-10 which is what we are used to working with. (101b=5d 1*2^2+0*2^1+1)

A CPU in a computer combines lots and lots of the above to function in the von-neumon model. The model says you have a CPU which does something and memory which stores something. The CPU takes something from memory, operates on it, and puts it back into memory.

The main stages in a CPU are as follows... from memory so may be off a bit:

1) fetch/decode instruction
2) fetch from memory / prepare registers
3) alu (arithmetic logic unit, does the operation from 1 on the values from 2)
4) memory write back (put the value from 3 back to memory or register)
5) loop back to 1

Things get kind of nasty when you start adding in interrupts, pipelines, prefetch queues, cache memory, etc...

It is a pain to work with transistors at this level. Instead, we use a language such as VHDL to express what we want to occur. The VHDL compiler will generate the transistor level layout based on the technology (mosis standard cell, etc) that you wish to use. The programs that do this are usually very expensive. I worked with mentor graphics which ran around $800,000 at the time.

I simplified things... it would take two or three grad level EE classes to explain how things worked, but it is all very forward and logical... there is no voodoo or magic involved.




check out this thread I made ages ago:
http://www.shroomery.org/forums/showflat...rue#Post1563584


--------------------


Post Extras: Print Post  Remind Me! Notify Moderator
Offlinephatclown
Place

Registered: 08/29/05
Posts: 87
Loc: Midwest Michigan
Last seen: 11 years, 6 months
Re: How do computers work? [Re: mantis]
    #4648420 - 09/12/05 12:56 AM (11 years, 6 months ago)

Hmm... well that went completly over my head and I've built one computer, and taken a programming class. Good luck guys lol.


--------------------
Psilocybin, It's what's for dinner, tonight...


Post Extras: Print Post  Remind Me! Notify Moderator
Offlinesoma_victim
Random

Registered: 06/16/05
Posts: 116
Loc: Lost
Last seen: 7 years, 6 months
Re: How do computers work? [Re: Limelight]
    #4648522 - 09/12/05 01:20 AM (11 years, 6 months ago)

also remember that the computers we use today weren't simply invented overnight. It took a lot of very smart people a very long time to get to this level of complexity.

besides, even after taking some form of computer-systems degree most people still don't completely understand every aspect of how a computer functions. it's all about abstraction, and working in teams of diverse skills to create systems this complex.


Post Extras: Print Post  Remind Me! Notify Moderator
OfflineFospher
Crime FightingMaster Criminal
Male

Registered: 02/09/05
Posts: 2,033
Loc: The Netherlands
Last seen: 5 years, 5 months
Re: How do computers work? [Re: soma_victim]
    #4648661 - 09/12/05 01:52 AM (11 years, 6 months ago)

Ok, think of it this way. The first computers ever built - the ones that weighed several tons and had the power of a modern calculator used punch cards as input. Punch cards are cards will holes in them, inputting either 1 or 0, a boolean of false or true. These binary codes equalled out to a number when decoded. These numbers would then equal out to letters or a pixel on the screen, a vector in a game, a vector would equal out to a 3D image, and that would equal out to some character in a 3D game. It's all a collection of decoders, one inputting information, one outputting.


--------------------
010001100100001001000101!


Post Extras: Print Post  Remind Me! Notify Moderator
OfflineLimelight
IntrepidTraveler
Male

Registered: 04/06/05
Posts: 791
Last seen: 7 years, 7 months
Re: How do computers work? [Re: Fospher]
    #4648700 - 09/12/05 02:00 AM (11 years, 6 months ago)

hmm. i smoked more thought about this again, and i sort of get it i think.. so it would go something like this, except cosmos more complex?

if pixel one is lit up, light up pixel 44, if both pixel 44 isnt on light up 32..

:rofl:


--------------------
"The worst mistake that you can make is to think you're alive when really you're asleep in life's waiting room."


Post Extras: Print Post  Remind Me! Notify Moderator
OfflineTheCow
Stranger

Registered: 10/28/02
Posts: 4,790
Last seen: 8 years, 8 months
Re: How do computers work? [Re: Limelight]
    #4648712 - 09/12/05 02:03 AM (11 years, 6 months ago)

Quote:

Limelight said:
hmm. i smoked more thought about this again, and i sort of get it i think.. so it would go something like this, except cosmos more complex?

if pixel one is lit up, light up pixel 44, if both pixel 44 isnt on light up 32..

:rofl:



Im not really sure what you mean.  A display adapter is just a certain function of a computer.


Post Extras: Print Post  Remind Me! Notify Moderator
OfflineLimelight
IntrepidTraveler
Male

Registered: 04/06/05
Posts: 791
Last seen: 7 years, 7 months
Re: How do computers work? [Re: TheCow]
    #4648726 - 09/12/05 02:07 AM (11 years, 6 months ago)

im wondering how the hell you can get math equations and stuff out of just using and, or and not... i mean going from pulses of electricty to mathematical (more or less) equations which can interpret itself i just dont get.


--------------------
"The worst mistake that you can make is to think you're alive when really you're asleep in life's waiting room."


Post Extras: Print Post  Remind Me! Notify Moderator
OfflineLimelight
IntrepidTraveler
Male

Registered: 04/06/05
Posts: 791
Last seen: 7 years, 7 months
Re: How do computers work? [Re: Limelight]
    #4648743 - 09/12/05 02:10 AM (11 years, 6 months ago)

like i understand that something has to decode the other end.. but i dont get how you can build something out of nothing. like i coudl see how you could build equations out of using a lot of logic gates.. but how do you write a program to understand those logic gates and turn them into other things, when the programs themselves are just logic gates.. i guess sort of like trying to learn spanish what its taught to you from the beginning in spanish.


--------------------
"The worst mistake that you can make is to think you're alive when really you're asleep in life's waiting room."


Post Extras: Print Post  Remind Me! Notify Moderator
OfflineLimelight
IntrepidTraveler
Male

Registered: 04/06/05
Posts: 791
Last seen: 7 years, 7 months
Re: How do computers work? [Re: Limelight]
    #4648745 - 09/12/05 02:10 AM (11 years, 6 months ago)

fuck im so confused :frown:


--------------------
"The worst mistake that you can make is to think you're alive when really you're asleep in life's waiting room."


Post Extras: Print Post  Remind Me! Notify Moderator
OfflinePuppet1
Stranger
Registered: 09/10/05
Posts: 62
Last seen: 11 years, 6 months
Re: How do computers work? [Re: Limelight]
    #4648850 - 09/12/05 02:41 AM (11 years, 6 months ago)

Because 0 and 1 is the basis of all technology, math, and science. I guess an easier way to understand computers is to understand that they are just pieces of hardware designed to manipulate the on and off's of electricity. Its all a manipulation of energy. Everything you do on your computer is designed to get the electricity out of the wall, manipulated to the users will, and displayed on the screen.

If you dont understand how to build formulas out of logical commands, take a C programming class. They teach you how to write an formula to solve any situation using AND/OR, IF/THEN, etc...

its incredibly hard turning every situation into a damn formula, thats why i never took a programming class after C. shit like that takes away from the value of life.


Post Extras: Print Post  Remind Me! Notify Moderator
OfflineFospher
Crime FightingMaster Criminal
Male

Registered: 02/09/05
Posts: 2,033
Loc: The Netherlands
Last seen: 5 years, 5 months
Re: How do computers work? [Re: Puppet1]
    #4648942 - 09/12/05 03:07 AM (11 years, 6 months ago)

It's not 'pulses of electricity'. It's just input and output of information between peripherals.


--------------------
010001100100001001000101!


Post Extras: Print Post  Remind Me! Notify Moderator
OfflineLimelight
IntrepidTraveler
Male

Registered: 04/06/05
Posts: 791
Last seen: 7 years, 7 months
Re: How do computers work? [Re: Puppet1]
    #4649305 - 09/12/05 09:11 AM (11 years, 6 months ago)

Quote:

Puppet1 said:


its incredibly hard turning every situation into a damn formula, thats why i never took a programming class after C. shit like that takes away from the value of life.




I guess that was essentially what i was asking. I cant imagine the geniuses who can do that  :smirk:


--------------------
"The worst mistake that you can make is to think you're alive when really you're asleep in life's waiting room."


Post Extras: Print Post  Remind Me! Notify Moderator
InvisibletrendalM
point of inflection
Male User Gallery

Registered: 04/17/01
Posts: 19,595
Loc: Ontario, Canada
Re: How do computers work? [Re: Limelight]
    #4649352 - 09/12/05 10:14 AM (11 years, 6 months ago)

http://en.wikipedia.org/wiki/Binary_numeral_system

It all begins with the binary system, so that's the best place to start out!

To "digitize" something, we take "samples" of whatever level we want to measure repeatedly a certain number of times per second. CD music, for example, uses a 44.1 kHz sample rate. 44,100 times a second we take a "snapshot" of the instantaneous soudwave amplitude, then store that as a number (usually decibels?). Say the value is 56 decibles, then this is stored in computer memory as 111000.

Manipulating the data is relatively easy, once it is in a binary state. On your CPU there are "registers" which are groups of transistors that each represent a "place value" in a "binary word". The size of these registers is what is meant when they say "32-bit chip" or "256-bit chip". Most PC chips these days are 32-bit, so the registers each have 32-bits in them (a "double word"). Say you want to add 4dB (100) to our previous value:

You stick the first value 111000 in register A, and the second value 100 in register B. Then you simply add together the first bit from each register, then the second, then third, and on, putting the result of each addition in a third register, C. The result you get, in this case, is 111100.

It doesn't take a genius to program a computer. Understanding binary will go a long way in helping someone program a computer, but it is by no means necessary. All "high level" languages take away all of the low-level hardware programming. You never see binary. High-level languages consist of human-readible code that represents entire sets of machine-code.

In C, for example, if I just want to print something to the screen I type:

printf("hello!");

(printf means "print formatted text")

So programming in these languages isn't as technical as one might think. Learning the basic syntax and grammar is probably the hardest part. You never really have to memorize any of the functions (like printf) - most people just keep a pile of textbooks around with pages and pages of functions as reference.

Of course someone (a team of someones) does have to program the compiler itself. The compiler is the program that takes all your high-level code like printf and converts it into machine-readible code for the processor to use. This is by no means an easy task, and to my knowledge takes a team of mathematicians to do. Not because programming in machine language is so difficult, but converting human language into machine language is exceedingly difficult.

I dunno, I'm pretty stoned. That was a fun rant.


--------------------
Like my post? Hit me up!
BTC - 1KqrSHZ1C3NsQP4g3PkHhppBnhdgyXr6sB


Post Extras: Print Post  Remind Me! Notify Moderator
Jump to top. Pages: 1

Community >> The Pub

Similar ThreadsPosterViewsRepliesLast post
* Using Your Fingers to Count Binary HighTek 1,151 10 04/29/07 09:09 PM
by learning_byte
* A pixel.... Captain Loafy McPoopdick 807 10 04/13/05 07:00 PM
by Todcasil
* anyone here good with computers? k2nride 661 10 08/20/04 04:30 AM
by Charles
* damn laptop pixel burnt out!
( 1 2 all )
Smallworlds 2,292 26 05/03/15 04:25 PM
by psi
* How do I get rid of a virus? (computer =) ) alakona 567 7 03/14/05 12:15 AM
by Psychoactive1984
* Someone told me starting a myspace page will fuck up your computer
( 1 2 all )
TheFakeSunRa 1,832 28 06/11/06 01:31 PM
by Prisoner#1
* computer use and age
( 1 2 3 all )
luckytriple6 1,969 51 04/20/09 12:42 PM
by badchad
* Computer Smart Guys, Does this make sense? whattheheck 489 14 02/09/09 02:51 PM
by whattheheck

Extra information
You cannot start new topics / You cannot reply to topics
HTML is disabled / BBCode is enabled
Moderator: Entire Staff
675 topic views. 24 members, 185 guests and 74 web crawlers are browsing this forum.
[ Toggle Favorite | Print Topic | Stats ]
Search this thread:
RVF Garden Supply
Please support our sponsors.

Copyright 1997-2017 Mind Media. Some rights reserved.

Generated in 0.056 seconds spending 0.002 seconds on 14 queries.