Register | Login
Views: 19364387
Main | Memberlist | Active users | ACS | Commons | Calendar | Online users
Ranks | FAQ | Color Chart | Photo album | IRC Chat
11-02-05 12:59 PM
0 user currently in Hardware/Software.
Acmlm's Board - I2 Archive - Hardware/Software - Question about Binary code. | |
Add to favorites | "RSS" Feed | Next newer thread | Next older thread
User Post
Ten

Cheep-cheep
Level: 23

Posts: 82/198
EXP: 60153
For next: 7570

Since: 07-24-04
From: Denver

Since last post: 69 days
Last activity: 32 days
Posted on 03-04-05 08:01 AM Link | Quote
We all know that computer data is a bunch of on ond off switches represented by ones and zeroes. But one thing I've always wondered is how the computer is suppose to know what all these switchs are supposed to mean in the first place. But every time I ask this no one gives me a actual answer to it. Does anyone know the answer to this?

And yes, I already know that ones and zeroes are the same as the north and south points of a magnet, that doesn't answer my question though.


(edited by Ten on 03-03-05 11:02 PM)
(edited by Ten on 03-04-05 12:27 AM)
(edited by Ten on 03-04-05 12:28 AM)
Cornellius

Buster Beetle
Level: 33

Posts: 160/460
EXP: 224182
For next: 4997

Since: 06-04-04
From: Sherbrooke, Quebec, Canada

Since last post: 3 days
Last activity: 10 hours
Posted on 03-04-05 09:03 AM Link | Quote
1 = High Level = ALMOST 5 Volts
0 = Low Level = ALMOST 0 Volts

It's all in the chips hands. If the chip receive a High Level, it will react by doing something and if it receive a Low Level, it will have another reaction and will do something else.

I don't want to flame but, is you sig, well, a liitle too long ?


(edited by The Devil's Vomit on 03-04-05 12:04 AM)
(edited by The Devil's Vomit on 03-04-05 12:05 AM)
Ten

Cheep-cheep
Level: 23

Posts: 83/198
EXP: 60153
For next: 7570

Since: 07-24-04
From: Denver

Since last post: 69 days
Last activity: 32 days
Posted on 03-04-05 09:26 AM Link | Quote
Well that answer is the straitest I've gotten so far but it's a bit too simple.

By the way, My sig shouldn't be double spaced like that, I think edit mode must of done that.
HyperLamer
<||bass> and this was the soloution i thought of that was guarinteed to piss off the greatest amount of people

Sesshomaru
Tamaranian

Level: 118

Posts: 3540/8210
EXP: 18171887
For next: 211027

Since: 03-15-04
From: Canada, w00t!
LOL FAD

Since last post: 2 hours
Last activity: 2 hours
Posted on 03-04-05 11:21 AM Link | Quote
Editing does that to some sigs, apparently. Anyway, the switches don't really 'mean' anything, they're just ordinary electronic switches. Same idea as a light switch only several billion times smaller (and controlled by electricity; no moving parts). Different combinations route electricity different ways, which makes the computer do different things. It really is mind-blowing to think that all the video games you play, web sites you see, programs you run, and even the most intelligent of AI is nothing more than electricity running through gazillions of switches...
FreeDOS

Lava Lotus
Wannabe-Mod :<
Level: 59

Posts: 1201/1657
EXP: 1648646
For next: 24482

Since: 03-15-04
From: Seattle

Since last post: 6 hours
Last activity: 4 hours
Posted on 03-05-05 08:19 AM Link | Quote
That's the biggest problem with AI: Is It really intelligent?
But then, you'd have to define what AI is, and that's changed many times over the decades.

Someone carefully constructed the chips to act a certain way with certain bits. Like HH said, mind-blowing.

edit: so is the telephone


(edited by FreeDOS on 03-04-05 11:20 PM)
Cornellius

Buster Beetle
Level: 33

Posts: 163/460
EXP: 224182
For next: 4997

Since: 06-04-04
From: Sherbrooke, Quebec, Canada

Since last post: 3 days
Last activity: 10 hours
Posted on 03-05-05 09:06 AM Link | Quote
Inside the chips, there is what we call ''Logic Doors''.

AND
OR
NOT
XOR
XAND
NAND

------
AND
------

1*1=1
0*1=0
1*0=0
0*0=0

--------
NOT
-------

1=0
0=1

This is simply an inverter.

------
OR
-----

0+1=1
1+1=1
1+0=1
0+0=0

--------
XOR
-------

1+0=1
0+1=1
1+1=0
0+0=0

---------
XAND
--------

1*1=1
0*0=1
1*0=0
0*1=0

---------
NAND
---------

1*1=0
0*1=1
1*0=1
0*0=1

The multiplication symbol ''*'' means an AND and the plus symbol ''+'' means an OR.


(edited by The Devil's Vomit on 03-05-05 12:15 AM)
neotransotaku

Baby Mario
戻れたら、
誰も気が付く
Level: 87

Posts: 2538/4016
EXP: 6220548
For next: 172226

Since: 03-15-04
From: Outside of Time/Space

Since last post: 11 hours
Last activity: 1 hour
Posted on 03-05-05 11:50 AM Link | Quote
yeah...depending on what voltages those doors (or gates as I call them) have been applied, different parts of an electronic chip will do different things. however, when gates are strung together, that is when work is done. Other types of electronic components do different things as gates aren't the only things operating.
Cornellius

Buster Beetle
Level: 33

Posts: 167/460
EXP: 224182
For next: 4997

Since: 06-04-04
From: Sherbrooke, Quebec, Canada

Since last post: 3 days
Last activity: 10 hours
Posted on 03-05-05 06:50 PM Link | Quote
Take the chip 7404 for example. His job is to invert. He's called an INVERTER

http://www.datasheetarchive.com/index.html

Look for the DM7404

There are pins for the Vcc (Voltage alimentation), the GND (The ground) and the pins with the inverters. There is 6 main logic gates, as I mentionned earlier. As you can see, they all have different combination of ZEROs and ONEs at the output.

The pin 14 is for the VCC
The pin 7 is for the GND

The others are the inverters. You see, if I put a ZERO at pin 1, a ONE will result at pin 2. If I put a ONE at pin 1, a ZERO will result at pin 2. This is only for the inverter. There are a damn lot of chips availaible including one of the six main gates, or a combination of two or more. The chip is carefully choosen depending on what we want to do.

Other chips examples :

7408 - is an AND chip. The symbol you see on the datasheet is the AND symbol.
7432 - is an OR chip. The symbol you see on the datasheet is the OR symbol.

Hope it helped. Feel free to ask if you have questions !


(edited by The Devil's Vomit on 03-05-05 09:51 AM)
||bass
Programmer Admin
Level: 44

Posts: 210/817
EXP: 570813
For next: 40472

Since: 03-15-04
From: Salem, Connecticut

Since last post: 26 days
Last activity: 11 days
Posted on 03-05-05 08:03 PM Link | Quote
When you ask how does the computer know what the binary code means, I assume you are asking about how machine code works.

Let's use a simple example.

The chip we will use for this example is the BIC9000 or Bass' Imaginary Chip 9000.

The BIC9000 has a single 8 bit register.
It has 4 instructions and can address 16 bytes of memory.

Our 4 instructions are as follows:
GET - Get's a value from memory and puts it into the register.
ADD - Adds the value in the register to a specified address in memory.
STO - Takes value from the register and stores it into a specified memory address.
HLT - Halts processing.

The binary values of the instructions are as follows.
GET = 00000001
ADD = 00000010
STO = 00000011
HLT = 00000100

Now lets say that we want to make a simple program to add two integers togather.

Now, we have 16 bytes of memory to work with, each byte can store either an instruction or a data value.

Our program will look like this

GET 9 - Gets the value from address 9 and stores it in a register.
ADD 10 - Adds the value from address 10 and adds it to the value in the register.
STO 11 - Stores the new value from the register into address 11.
HLT - Ends the program.

Byte by byte the program will have the following data.

Byte 1: 00000001 (The value of the GET instruction)
Byte 2: 00001001 (The value 9)
Byte 3: 00000010 (The value of the ADD instruction)
Byte 4: 00001010 (The value 10)
Byte 5: 00000011 (The value of the STO instruction)
Byte 6: 00001011 (The value 11)
Byte 7: 00000100 (The value of the HLT instruction)

So if our byte 9 and 10 look as follows:
Byte 9: 01000000 (The number 64)
Byte 10: 10000000 (The number 128)

Then byte 11 will be as follows once the program has run:
Byte 11: 11000000 (The number 192)

Bytes 8, 12, 13, 14, 15, and 16 will contain the value 0. (They dont matter)

Our total program will look as follows before the program runs.
000000010000100100000010000010100000001100001011000001000000000001000000
10000000000000000000000000000000000000000000000000000000

Our total program will look as follows after the program runs.
000000010000100100000010000010100000001100001011000001000000000001000000
10000000110000000000000000000000000000000000000000000000

Hope this helps...

[HH: But let's not stretch the page. Closing colour tags might be good too.]


(edited by ||bass on 03-05-05 11:06 AM)
(edited by ||bass on 03-05-05 11:07 AM)
(edited by ||bass on 03-05-05 11:07 AM)
(edited by ||bass on 03-06-05 10:37 AM)
(edited by HyperHacker on 03-07-05 03:18 AM)
(edited by HyperHacker on 03-07-05 03:19 AM)
Add to favorites | "RSS" Feed | Next newer thread | Next older thread
Acmlm's Board - I2 Archive - Hardware/Software - Question about Binary code. | |


ABII


AcmlmBoard vl.ol (11-01-05)
© 2000-2005 Acmlm, Emuz, et al



Page rendered in 0.008 seconds.