Programming, computers, etc. [Serious]
- Dreams
- 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]
Who still knows how to code in binary?
- Anonymously Famous
- JKL; Assassin
- Posts: 11413
- Joined: Thu Mar 03, 2011 6:52 pm
- Location: Area ???, under Bermuda Triangle
Re: Programming, computers, etc. [Serious]
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
Proud poster of the 300kth post in GeneralThingerDudes wrote:The only reasonable amount of Nutella is infinity. Everything else is too little.
- Anonymously Famous
- JKL; Assassin
- Posts: 11413
- Joined: Thu Mar 03, 2011 6:52 pm
- Location: Area ???, under Bermuda Triangle
Re: Programming, computers, etc. [Serious]
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
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
Proud poster of the 300kth post in GeneralThingerDudes wrote:The only reasonable amount of Nutella is infinity. Everything else is too little.
- AmazinglyASDF
- ASDF Worshipper
- Posts: 468
- Joined: Thu Jul 21, 2011 5:51 am
Re: Programming, computers, etc. [Serious]
Binary confuses me. Can you explain it for an idiot?
gggggggggg
Re: Programming, computers, etc. [Serious]
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...
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.
- AmazinglyASDF
- ASDF Worshipper
- Posts: 468
- Joined: Thu Jul 21, 2011 5:51 am
- AmazinglyASDF
- ASDF Worshipper
- Posts: 468
- Joined: Thu Jul 21, 2011 5:51 am
Re: Programming, computers, etc. [Serious]
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
- atomtengeralattjaro
- 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]
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: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: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..
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
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
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..
- Anonymously Famous
- JKL; Assassin
- Posts: 11413
- Joined: Thu Mar 03, 2011 6:52 pm
- Location: Area ???, under Bermuda Triangle
Re: Programming, computers, etc. [Serious]
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.
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
Proud poster of the 300kth post in GeneralThingerDudes wrote:The only reasonable amount of Nutella is infinity. Everything else is too little.
- AmazinglyASDF
- ASDF Worshipper
- Posts: 468
- Joined: Thu Jul 21, 2011 5:51 am
- atomtengeralattjaro
- Site Admin
- Posts: 37518
- Joined: Wed May 23, 2007 3:43 pm
- Location: green
- Pronouns: he / they / that submarine
- Contact:
- AmazinglyASDF
- ASDF Worshipper
- Posts: 468
- Joined: Thu Jul 21, 2011 5:51 am
- Anonymously Famous
- JKL; Assassin
- Posts: 11413
- Joined: Thu Mar 03, 2011 6:52 pm
- Location: Area ???, under Bermuda Triangle
Re: Programming, computers, etc. [Serious]
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).
(BTW, atom, I didn't learn anything about different bases until high school, and only then because I took programming classes).
BOTTOM TEXT
Proud poster of the 300kth post in GeneralThingerDudes wrote:The only reasonable amount of Nutella is infinity. Everything else is too little.
- atomtengeralattjaro
- Site Admin
- Posts: 37518
- Joined: Wed May 23, 2007 3:43 pm
- Location: green
- Pronouns: he / they / that submarine
- Contact:
- Dreams
- 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]
Base .5 How would that work?
- Anonymously Famous
- JKL; Assassin
- Posts: 11413
- Joined: Thu Mar 03, 2011 6:52 pm
- Location: Area ???, under Bermuda Triangle
Re: Programming, computers, etc. [Serious]
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.
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
Proud poster of the 300kth post in GeneralThingerDudes wrote:The only reasonable amount of Nutella is infinity. Everything else is too little.
- atomtengeralattjaro
- Site Admin
- Posts: 37518
- Joined: Wed May 23, 2007 3:43 pm
- Location: green
- Pronouns: he / they / that submarine
- Contact:
- Anonymously Famous
- JKL; Assassin
- Posts: 11413
- Joined: Thu Mar 03, 2011 6:52 pm
- Location: Area ???, under Bermuda Triangle
Re: Programming, computers, etc. [Serious]
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
Proud poster of the 300kth post in GeneralThingerDudes wrote:The only reasonable amount of Nutella is infinity. Everything else is too little.
-
- ASDF-ville inhabitant
- Posts: 3
- Joined: Thu Feb 23, 2012 12:50 am
Re: Programming, computers, etc. [Serious]
Base 1 =
0 = 0
00 = 1
000 = 2
So base 1 is possible
0 = 0
00 = 1
000 = 2
So base 1 is possible