 Keith and The Girl Forums (http://www.keithandthegirl.com/forums/)
-   Show Talk (http://www.keithandthegirl.com/forums/f5/)
-   -   1281: 10001110101 IN 3-D (http://www.keithandthegirl.com/forums/f5/1281-10001110101-3-d-15735/)

 Keith 10-28-2010 10:17 PM

1281: 10001110101 IN 3-D

"I happened to masturbate to this woman just the other day."

www.OneManHamlet.net

www.Lattaland.com

 mcbane89 10-28-2010 11:17 PM

NOW!!NOW!!

 DWarrior 10-29-2010 12:17 AM

u IN 3-D

Yay, my kind of title!

Here's a little of foundations to extend your computer science knowledge:

The reason 0s and 1s are used is because, as you said, they can model "off" and "on" (0 for nothing, 1 for something), and it's a lot easier to make a two-state switch than a 3-state switch.

The most basic motivation for creating computers is to...compute stuff, and since it's also congruent with my interests, I know a bit of that. Anything more advanced, I'll leave to the computer nerds:

All numbers can be represented as binary sequences, so for whole numbers the easiest way is to make each place a power of 2, remember that 2^0 (2 to 0th power) is 1. So 0 is still 0, 1 is still 1, but now 10 is 2 (2*1 + 1*0), 110 is 6 (4*1+2*1+1*0), 1111 is 15 (8*1+4*1+2*1+1*1).

You can do all math in binary, it's just a bit strange, and nobody sane remembers a multiplication table in binary. But if you want to add 5+3, in binary it's 101+11=1000. 10-7 is 1010-111=11. Multiplying by 2 is easy as multiplying by 10 in binary: 7*2 is 111*10=1110

And you also have propositional logic, let False = 0, True = 1. A logical variable A takes on only one of two possible values, 0 (for False) or 1 (for True).

Define three operations:
Given some value A, define ~A (read "not A") as its opposite. So ~0=1, ~1=0.

Given A and B, define (A v B) (read "A or B") as 1 if at least one of them is 1. So (0 v 0)=0, but all other cases are 1.

Given A and B, define (A ^ B) (read "A and B") as 1 if both of them are 1s, otherwise 0. So (1 ^ 1)=1, everything else is 0.

If you imagine A and B as some sort of pipes with water (or wires with electricity), you can construct "logic gates" that will produce flow corresponding to the desired operation. For example, an "OR gate" with input tubes A and B is simply the merging of the two tubes. If water flows through one of them, water will flow out, otherwise nothing. A "NOT gate" with input A would need a separate stream that would flow out if nothing flows out of A or would get deflected if there's a stream at A.

Of course, it's much more convenient to manipulate electronic logic gates than pipes with water. This is usually done on a circuit board.

We now have the tools to make a very basic adding calculator. Here's one that adds two numbers up to 7:

Given two numbers, A and B, write them in binary and each up to three binary digits long (so up to 7), write A as (a3 a2 a1) and B as (b3 b2 b1), where a1 is the first digit of A, a2 is the second digit, and so on. If the numbers are less than 3 digits long, then just tack on 0s on the left (so if A=1, write 001).

A+B=C, where C can be up to four digits long, written as (c4 c3 c2 c1). Then the propositional logic formulas for addition are:

c1 = (a1 v b1) ^ ~(a1 ^ b1)

c2 = (((a1 ^ b1) v ((a2 v b2) ^ ~(a2 ^ b2))) ^ ~((a1 ^ b1) ^ ((a2 v b2) ^ ~(a2 ^ b2))))

c3 = (((((a2 ^ b2) v (a2 ^ (a1 ^ b1))) v (b2 ^ (a1 ^ b1))) v ((a3 v b3) ^ ~(a3 ^ b3))) ^ ~((((a2 ^ b2) v (a2 ^ (a1 ^ b1))) v (b2 ^ (a1 ^ b1))) ^ ((a3 v b3) ^ ~(a3 ^ b3))))

c4 = (((a3 ^ b3) v (a3 ^ (((a2 ^ b2) v (a2 ^ (a1 ^ b1))) v (b2 ^ (a1 ^ b1))))) v (b3 ^ (((a2 ^ b2) v (a2 ^ (a1 ^ b1))) v (b2 ^ (a1 ^ b1)))))

If you want to add 2+6, input for A (0, 1, 0) and for B (1, 1, 0), and if you go through the equations, you will see C comes out to be (1, 0, 0, 0), which is just 8 in binary.

If you had a circuit board and a bunch of logic gates at your disposal, and batteries/lightbulbs for input and output, you could construct this calculator. In practice, these gates are constructed on a molecular scale, so you have millions of them packed in one chip.

 Keith 10-29-2010 12:34 AM

I disagree with some of that.

 fluxquanta 10-29-2010 12:45 AM

Quote:
 Originally Posted by DWarrior (Post 678414) Yay, my kind of title!
I don't know what's more sad: you writing this whole post, me reading the whole thing, or me understanding and being bored with it.

It did make me want to bust out my soldering iron, though.

 DWarrior 10-29-2010 01:11 AM

Quote:
 Originally Posted by fluxquanta (Post 678418) I don't know what's more sad: you writing this whole post, me reading the whole thing, or me understanding and being bored with it. It did make me want to bust out my soldering iron, though.
I think me writing all that wins by far. None of it is really complicated though, so I expect tech nerds to be bored, and everyone else to be jostled by the notation.

Sadly, that's pretty much the extent of my low-level comp sci knowledge. I'm not even familiar with a computer as a logic-machine, I only have a guess at how a PC actually works. Highschool assembly class pretty much turned me off low-level computing forever.

I've also never soldered a logical circuit on the not/and/or level, I've only done the diagrams. Do you actually need to buy the gates, or are the basic ones easy to make on your own?

 fluxquanta 10-29-2010 01:24 AM

Quote:
 Originally Posted by DWarrior (Post 678423) Do you actually need to buy the gates, or are the basic ones easy to make on your own?
Circuit components are cheap as fuck, so I would imagine making most "elementary" parts would just be a wasted effort (last time I bought transistors they were 15 for \$3 at Radio Shack, IC's are maybe a dollar each). I've never seen pure logic gates used in actual circuits though. Admittedly my hands on circuit experience isn't that vast (I took one electronics course in college and dicked around on my own), but I think all logic gates are done in the context of integrated circuits which you can just pick up.

See CMOS - Wikipedia, the free encyclopedia

 Keith 10-29-2010 02:05 AM

I think A/S/L should include F

You guys fucking someone?

 DWarrior 10-29-2010 02:39 AM

Quote:
 Originally Posted by Keith (Post 678426) I think A/S/L should include F You guys fucking someone?
Not currently.

http://img41.imageshack.us/img41/6807/onohedidnt.jpg

 Keith 10-29-2010 02:48 AM

36/Male/NYC/Yes

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