Programming, computers, etc. [Serious]

All things asdf (and anything else)
User avatar
Dreams
ASDF High Priest
ASDF High Priest
Posts: 2306
Joined: Tue Nov 29, 2011 7:04 pm
Location: STOP STALKING ME! I'M INSECURE!
Contact:

Re: Programming, computers, etc. [Serious]

Post by Dreams » Wed Feb 22, 2012 11:57 pm

Who still knows how to code in binary?

User avatar
Anonymously Famous
JKL; Assassin
JKL; Assassin
Posts: 11413
Joined: Thu Mar 03, 2011 6:52 pm
Location: Area ???, under Bermuda Triangle

Re: Programming, computers, etc. [Serious]

Post by Anonymously Famous » Thu Feb 23, 2012 12:58 am

Binary code changes depending on the processor, but I did learn how to code in binary for a make-believe processor (created for educational purposes). It's possible to look at a program in a hex editor and figure some things out, especially if you know the instruction set for a particular processor. I should really look up the Intel processor instruction set sometime.
BOTTOM TEXT
ThingerDudes wrote:The only reasonable amount of Nutella is infinity. Everything else is too little.
Proud poster of the 300kth post in General

User avatar
Anonymously Famous
JKL; Assassin
JKL; Assassin
Posts: 11413
Joined: Thu Mar 03, 2011 6:52 pm
Location: Area ???, under Bermuda Triangle

Re: Programming, computers, etc. [Serious]

Post by Anonymously Famous » Thu Feb 23, 2012 4:12 pm

Hi all,

I was asking around the Face Books yesterday about how I could apply my new found Haskell knowledge (not that I know everything about it yet). One friend reminded me of Project Euler. You have to register to keep track of your progress and check your answers, but essentially it's a list of problems that can be solved with math and programming. You can see the list of problems here to see if it's something you might want to try.

Just thought I'd pass that on.

-AF
BOTTOM TEXT
ThingerDudes wrote:The only reasonable amount of Nutella is infinity. Everything else is too little.
Proud poster of the 300kth post in General

User avatar
AmazinglyASDF
ASDF Worshipper
ASDF Worshipper
Posts: 468
Joined: Thu Jul 21, 2011 5:51 am

Re: Programming, computers, etc. [Serious]

Post by AmazinglyASDF » Thu Feb 23, 2012 10:24 pm

Binary confuses me. Can you explain it for an idiot?
gggggggggg

User avatar
MTG09
ASDF High Priest
ASDF High Priest
Posts: 2622
Joined: Tue Jan 10, 2012 12:42 am
Location: Earth
Contact:

Re: Programming, computers, etc. [Serious]

Post by MTG09 » Fri Feb 24, 2012 12:56 am

binary is made of only 1's and 0's
Instead of decimal where the place rolls over after 9, binary rolls over after 1
the tens place in decimal is the twos place in binary, the hundreds are the 4 place, the thousands are the 8's place
0=0, 1=1, 10=2, 11=3, 100=4
so the first #'s are 0,1,10,11,100...
Last edited by MTG09 on Fri Feb 24, 2012 1:11 am, edited 1 time in total.
The secrets of life:
Anonymously Famous wrote:Is is is. [source]
...
And it always will be. [source]

User avatar
AmazinglyASDF
ASDF Worshipper
ASDF Worshipper
Posts: 468
Joined: Thu Jul 21, 2011 5:51 am

Re: Programming, computers, etc. [Serious]

Post by AmazinglyASDF » Fri Feb 24, 2012 12:57 am

What
gggggggggg

User avatar
MTG09
ASDF High Priest
ASDF High Priest
Posts: 2622
Joined: Tue Jan 10, 2012 12:42 am
Location: Earth
Contact:

Re: Programming, computers, etc. [Serious]

Post by MTG09 » Fri Feb 24, 2012 1:14 am

better?
The secrets of life:
Anonymously Famous wrote:Is is is. [source]
...
And it always will be. [source]

User avatar
AmazinglyASDF
ASDF Worshipper
ASDF Worshipper
Posts: 468
Joined: Thu Jul 21, 2011 5:51 am

Re: Programming, computers, etc. [Serious]

Post by AmazinglyASDF » Fri Feb 24, 2012 1:59 am

Er, no. I don't understand the following:
MTG09 wrote:Instead of decimal where the place rolls over after 9, binary rolls over after 1
MTG09 wrote:the tens place in decimal is the twos place in binary, the hundreds are the 4 place, the thousands are the 8's place
MTG09 wrote:0=0, 1=1, 10=2, 11=3, 100=4
gggggggggg

User avatar
atomtengeralattjaro
Site Admin
Site Admin
Posts: 37518
Joined: Wed May 23, 2007 3:43 pm
Location: green
Pronouns: he / they / that submarine
Contact:

Re: Programming, computers, etc. [Serious]

Post by atomtengeralattjaro » Fri Feb 24, 2012 12:39 pm

I'm pretty sure they teach this at every school. And by that I mean every educational institution above kindergarten.

The base of a number system determines how many states can one digit (one number character) take on. Meaning, in base 10 (the default number system for us) one digit can take up to 10 states, because the number you can show on one digit can be any number from 0 to 9.
Unlike in base 2 (binary), where one digit can only take up two states: it can either be 0 or 1. Therefore using one digit, you can only show 0 or 1. If you want to show 2, you will need another digit, so your number will be 10 (that's "one zero", and NOT ten). The values of each digit multiply by 2:

Code: Select all

...|32|16|8|4|2|1 <- digit values
              1 0 <- the binary number
see, the 1 is under the value 2, therefore it is worth 2 in base 10. Under the value 1 there is only a zero, so it is worth nothing.
Similarly, if you try to convert 6 to binary, you'll get 110, because:

Code: Select all

...|32|16|8|4|2|1 <- digit values
            1 1 0 <- the binary number
there is a 1 under the value 4, so it's worth 4, and then there is a 1 under the value 2, so it's worth 2, and there is a 0 under the value 1 so it's worth 0, the sum of these (4+2) is worth 6.
I hope you can see why 11 in binary means 3 in base 10, and 1010 in binary means 10 in base10, and so on..
Ivokyuftaf6666 wrote:
Sun Oct 20, 2019 5:22 pm
Awesome Site, Delivering Fun
Image

User avatar
Anonymously Famous
JKL; Assassin
JKL; Assassin
Posts: 11413
Joined: Thu Mar 03, 2011 6:52 pm
Location: Area ???, under Bermuda Triangle

Re: Programming, computers, etc. [Serious]

Post by Anonymously Famous » Fri Feb 24, 2012 3:07 pm

I was wearing this shirt yesterday. It's relevant, really.

If you don't want to study binary too in-depth, you can just think of it as another way to represent a number. It follows the same logic as the numbers that you're used to, except using 2 instead of 10 as a base. Any number can be represented in binary or in decimal.

Binary is important in programming, and in computers in general. That's because every digit in binary only has two states: '0' and '1'. Computers, essentially, are a collection of switches that can have only two states: "off" and "on". For this reason, everything in your computer is stored in binary. Computer programs translate to instructions that are represented as binary numbers. Bitmap images are a list of binary numbers representing what color each pixel should be. Characters (numbers, letters, etc.) each have a numerical value. Without the concept of binary, computers as we know them would not exist.
BOTTOM TEXT
ThingerDudes wrote:The only reasonable amount of Nutella is infinity. Everything else is too little.
Proud poster of the 300kth post in General

User avatar
AmazinglyASDF
ASDF Worshipper
ASDF Worshipper
Posts: 468
Joined: Thu Jul 21, 2011 5:51 am

Re: Programming, computers, etc. [Serious]

Post by AmazinglyASDF » Sat Feb 25, 2012 2:08 am

I lol'd.
gggggggggg

User avatar
atomtengeralattjaro
Site Admin
Site Admin
Posts: 37518
Joined: Wed May 23, 2007 3:43 pm
Location: green
Pronouns: he / they / that submarine
Contact:

Re: Programming, computers, etc. [Serious]

Post by atomtengeralattjaro » Sat Feb 25, 2012 11:25 am

i was hoping you didn't abuse our willingness to help.
Ivokyuftaf6666 wrote:
Sun Oct 20, 2019 5:22 pm
Awesome Site, Delivering Fun
Image

User avatar
AmazinglyASDF
ASDF Worshipper
ASDF Worshipper
Posts: 468
Joined: Thu Jul 21, 2011 5:51 am

Re: Programming, computers, etc. [Serious]

Post by AmazinglyASDF » Sat Feb 25, 2012 1:39 pm

How would I?
gggggggggg

User avatar
Anonymously Famous
JKL; Assassin
JKL; Assassin
Posts: 11413
Joined: Thu Mar 03, 2011 6:52 pm
Location: Area ???, under Bermuda Triangle

Re: Programming, computers, etc. [Serious]

Post by Anonymously Famous » Sat Feb 25, 2012 2:34 pm

I'm guessing you were laughing at my shirt, and not at our explanations, correct?

(BTW, atom, I didn't learn anything about different bases until high school, and only then because I took programming classes).
BOTTOM TEXT
ThingerDudes wrote:The only reasonable amount of Nutella is infinity. Everything else is too little.
Proud poster of the 300kth post in General

User avatar
atomtengeralattjaro
Site Admin
Site Admin
Posts: 37518
Joined: Wed May 23, 2007 3:43 pm
Location: green
Pronouns: he / they / that submarine
Contact:

Re: Programming, computers, etc. [Serious]

Post by atomtengeralattjaro » Sat Feb 25, 2012 3:35 pm

that's strange.
Ivokyuftaf6666 wrote:
Sun Oct 20, 2019 5:22 pm
Awesome Site, Delivering Fun
Image

User avatar
Dreams
ASDF High Priest
ASDF High Priest
Posts: 2306
Joined: Tue Nov 29, 2011 7:04 pm
Location: STOP STALKING ME! I'M INSECURE!
Contact:

Re: Programming, computers, etc. [Serious]

Post by Dreams » Mon Feb 27, 2012 5:33 pm

Base .5 How would that work?

User avatar
Anonymously Famous
JKL; Assassin
JKL; Assassin
Posts: 11413
Joined: Thu Mar 03, 2011 6:52 pm
Location: Area ???, under Bermuda Triangle

Re: Programming, computers, etc. [Serious]

Post by Anonymously Famous » Mon Feb 27, 2012 8:10 pm

Base 0.5? It would probably be backwards somehow. The way it normally works is ...n3 n2 n1 n0.n-1 n-2 n-3..., where n is the base. Since your base would be a fraction, the "place" would actually get smaller going to the left and larger going to the right.

This message board entry that I came to through a Google search confirms what I suspected. Since 0.5 is the inverse of 2, base 0.5 would look like a backwards binary.
some dude at the aforementioned link wrote:"Base 0.5" wouldn't be much different from base 2; you just swap the stuff to the left of the units position with the stuff to the right. For example, thirteen in base 0.5 would be 1.011, instead of 1101 in binary, and four and one-eighth would be 1000.01 in base 0.5 instead of 100.001 in binary.
BOTTOM TEXT
ThingerDudes wrote:The only reasonable amount of Nutella is infinity. Everything else is too little.
Proud poster of the 300kth post in General

User avatar
atomtengeralattjaro
Site Admin
Site Admin
Posts: 37518
Joined: Wed May 23, 2007 3:43 pm
Location: green
Pronouns: he / they / that submarine
Contact:

Re: Programming, computers, etc. [Serious]

Post by atomtengeralattjaro » Mon Feb 27, 2012 8:17 pm

fun fun! (what about base 0? :P )
Ivokyuftaf6666 wrote:
Sun Oct 20, 2019 5:22 pm
Awesome Site, Delivering Fun
Image

User avatar
Anonymously Famous
JKL; Assassin
JKL; Assassin
Posts: 11413
Joined: Thu Mar 03, 2011 6:52 pm
Location: Area ???, under Bermuda Triangle

Re: Programming, computers, etc. [Serious]

Post by Anonymously Famous » Mon Feb 27, 2012 8:48 pm

Can't do base 0. Can't do base 1. Negative bases can be done, though. If you do base -2, for example, the "places" would be ...-8 4 -2 1, so you could represent any number, positive or negative, without using a negative sign.
BOTTOM TEXT
ThingerDudes wrote:The only reasonable amount of Nutella is infinity. Everything else is too little.
Proud poster of the 300kth post in General

Wizard of Asdf
ASDF-ville inhabitant
ASDF-ville inhabitant
Posts: 3
Joined: Thu Feb 23, 2012 12:50 am

Re: Programming, computers, etc. [Serious]

Post by Wizard of Asdf » Wed Feb 29, 2012 4:21 pm

Base 1 =
0 = 0
00 = 1
000 = 2
So base 1 is possible

Post Reply