Notices
Results 1 to 4 of 4

Thread: How do computers work?

  1. #1 How do computers work? 
    Forum Freshman
    Join Date
    Feb 2008
    Posts
    20
    Im trying to sleep but a realization of something big I dont know is keeping me awake. How do computers work? At their core.

    Here is what I think I know. Computers function through a series of electrical impulses, represented by 1s and 0s. 1 meaning electricity on, 0 meaning off. like Morse code. The longer the electricity is running, the more 1s result and vice versa. So 010 might mean the number 0, 0110 the number 1, 01110 the number 3 ecetera.

    Bursts of impulses are then interpreted by the machine to light up certain patterns of pixels or somehow leave an imprint on a harddrive resulting in a data file. As more complicated tasks are desired coding languages are created to serve as shortcuts. With the first layer of code being whatever code allows typing like the letter 'L' to trigger the pattern of 1s and 0s to result in 'L'.

    What has left me feeling confused is how exactly electrical impulses of varying durations can result in a different pattern of pixels lit up or data being written. It would have to be something mechanical. But I cannot concieve of what or how such a thing could be done.

    So how does the mschine differentiate between the various impulse lengths to cause different effects?

    Best I can think of Is that there maybe some kind of switchboard? Like maybe there are a number of switches (equal to the number of screen pixels the computer can handle*the number of possible combinations)+36, that get flipped in sequence as electricity is connected to them. So the longer the duration the more switches get flipped. And then there is a secondary impulse of electricity that flows in a direction determined by the number of switches flipped. Like towards screen pixels to light them or towards the harddrive to imprint it.

    Problem is, that would require an absurd number of switches like millions. So its not really practical.


    Reply With Quote  
     

  2.  
     

  3. #2  
    Moderator Moderator Janus's Avatar
    Join Date
    Jun 2007
    Posts
    2,120
    Quote Originally Posted by Humility View Post
    Im trying to sleep but a realization of something big I dont know is keeping me awake. How do computers work? At their core.

    Here is what I think I know. Computers function through a series of electrical impulses, represented by 1s and 0s. 1 meaning electricity on, 0 meaning off. like Morse code. The longer the electricity is running, the more 1s result and vice versa. So 010 might mean the number 0, 0110 the number 1, 01110 the number 3 ecetera.

    Bursts of impulses are then interpreted by the machine to light up certain patterns of pixels or somehow leave an imprint on a harddrive resulting in a data file. As more complicated tasks are desired coding languages are created to serve as shortcuts. With the first layer of code being whatever code allows typing like the letter 'L' to trigger the pattern of 1s and 0s to result in 'L'.

    What has left me feeling confused is how exactly electrical impulses of varying durations can result in a different pattern of pixels lit up or data being written. It would have to be something mechanical. But I cannot concieve of what or how such a thing could be done.

    So how does the mschine differentiate between the various impulse lengths to cause different effects?

    Best I can think of Is that there maybe some kind of switchboard? Like maybe there are a number of switches (equal to the number of screen pixels the computer can handle*the number of possible combinations)+36, that get flipped in sequence as electricity is connected to them. So the longer the duration the more switches get flipped. And then there is a secondary impulse of electricity that flows in a direction determined by the number of switches flipped. Like towards screen pixels to light them or towards the harddrive to imprint it.

    Problem is, that would require an absurd number of switches like millions. So its not really practical.
    Your conception of how computers operate, (particularly how they use 1s and 0s to represent numbers) is incorrect. It has nothing to do with counting pulses. Instead, the each one or zero is a binary digit or "bit". Bits are grouped into 8 bit "bytes". A number is represented by the pattern of ones and zeros in a byte like thus:
    00000000 =0
    00000001=1
    00000010=2
    00000011=3
    00000100=4
    00000101=5
    00000110=6
    00000111=7
    00001000=8
    00001001=9

    00001010=10 but when working with computers, it is generally designated A instead of ten. Following this example 11=B, 12=C, 13=D, 14=E, and 15=F.
    that way, continuing on from 00001001 =9, you get

    00001010=A
    00001011=B
    00001100=C
    00001101=D
    00001110=E
    00001111=F

    This can be continued all the way up to
    11111111=FF= 255
    Grouping bytes together can give you even larger numbers
    FFFF = 65535 for example. This number system is called hexadecimal

    There are other ways to use these bits to represent data. One is ASCII. This uses each byte to represent a character
    Here
    01100001 = a
    01000001= A
    00110001 = 1 (the character)

    Yet another is binary-coded decimal(BCD). This uses the same code as hexadecimal for the numbers 0-9, but eliminates A-F
    in BCD
    0001000 =10
    0001001=11
    0001010=12
    ...
    10011001=99
    The first 4 bits represent the tens place and the second 4 bits the ones place of a two digit decimal number.

    How a computer treats any byte depends on its instructions.

    Computers generally work with these numbers in Byte-sized hunks. A 64 bit computer works with 8 bytes at a time. What this means is that when it is moving bytes around it does so with a 64 bit "bus", Think of a bus as a group of wires. An 8 bit bus would have 8 wires, each carrying 1 bit, a 64 bit bus would have 64 wires, etc.

    Of course, when your computer communicates over the internet, it isn't doing it through 64 wire cables, It has to do it 1 bit at a time or serially. The information is still sent in bytes, with a string of 8 ones and zero representing one byte. There are communication protocols which tell your computer where one byte ends and anther begins.

    Going into the detail of how a modern computer manipulates these bytes to display an image on your screen for example, would require explaining the operation of memory addresses, shift registers, decoders, etc, and is way too involved to get into here.

    Suffice it to say that the color of any given pixel of your screen is saved in at a memory location, a different memory location for each pixel. This information is read and sent to the monitor so that it displays the proper color at the proper pixel. The memory locations are being constantly scanned at a high rate, so that the image on the screen can be constantly updated.


    "Men are apt to mistake the strength of their feelings for the strength of their argument.
    The heated mind resents the chill touch & relentless scrutiny of logic"-W.E. Gladstone


    Edit/Delete Message
    Reply With Quote  
     

  4. #3  
    Forum Freshman
    Join Date
    Feb 2008
    Posts
    20
    Ok, thank you. That makes sense.
    Reply With Quote  
     

  5. #4  
    Forum Ph.D. mmatt9876's Avatar
    Join Date
    Aug 2009
    Location
    United States
    Posts
    917
    I think Khan Academy has some resources on computer science.
    Reply With Quote  
     

Similar Threads

  1. Fast Computers
    By TimeLord in forum Computer Science
    Replies: 7
    Last Post: March 19th, 2013, 05:38 AM
  2. Computers
    By Scifiguy in forum Mechanical, Structural and Chemical Engineering
    Replies: 2
    Last Post: December 11th, 2012, 09:15 PM
  3. book on computers
    By jtpope1 in forum Computer Science
    Replies: 2
    Last Post: July 11th, 2012, 02:36 AM
  4. Computers and Imaginary Numbers
    By bgjyd834 in forum Computer Science
    Replies: 3
    Last Post: May 21st, 2011, 03:51 PM
  5. Computers in Robots
    By Frenchi in forum Computer Science
    Replies: 5
    Last Post: July 15th, 2008, 01:55 AM
Bookmarks
Bookmarks
Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •