Register - Login
Views: 99806104
Main - Memberlist - Active users - Calendar - Wiki - IRC Chat - Online users
Ranks - Rules/FAQ - Stats - Latest Posts - Color Chart - Smilies
05-03-22 08:01:45 AM
Jul - Computers and Technology - Converting Binary (tall image) New poll - New thread - New reply
Next newer thread | Next older thread
Darkdata
Ruins!? ♥
Level: 103


Posts: 2014/2892
EXP: 11446096
For next: 25310

Since: 07-04-07


Since last post: 202 days
Last activity: 10 days

Posted on 01-10-11 06:38:36 PM Link | Quote


Had to show a friend how to do it over the internet~

Feel free to laugh at my horrible mspaint image.

____________________

Drag
2640
Level: 99


Posts: 1923/2641
EXP: 9990162
For next: 9838

Since: 07-03-07


Since last post: 4.2 years
Last activity: 3.4 years

Posted on 01-10-11 09:26:08 PM Link | Quote
1923
Let D be any number in base 10
Let B[x] be an array of bits

1] Find the largest value of 2^N where 2^N is less than D
2] Set B[N] = 1
3] Subtract (2^N) from D
4] If D is greater than 0, go to 1

____________________
Taryn

Passed away.

Thanks for being a part of us, even if it wasn't always on the best of terms.

1987-2014


Level: 204


Posts: 11169/14742
EXP: 121746395
For next: 1603423

Since: 09-01-09

From: Seattle

Since last post: 10.1 years
Last activity: 9.8 years

Posted on 01-10-11 11:28:36 PM Link | Quote
I basically do it the same way as Darkdata

I had a teacher who tried to explain it some other way involving a lot of division, and I was more confused.

____________________

TKB Super Mario Bros.TKB Super Mario Bros., Volume II
paulguy

Green Birdo
Level: 93


Posts: 1209/2294
EXP: 8032397
For next: 20413

Since: 09-14-07

From: Buffalo, NY

Since last post: 9.7 years
Last activity: 9.7 years

Posted on 01-11-11 02:13:47 AM Link | Quote
Paulguy's Post configuration
Yeah I learned it the way darkdata said.

I even programmed a thing in qbasic that did this because it doesn't have binary ops that I could find, at least at the time. This was years ago, and it was ugly as shit.

____________________
Gabu

Star Mario
Placeholder Ikachan until :effort: is found
Level: 172


Posts: 4460/9981
EXP: 67989701
For next: 112533

Since: 08-10-09

Pronouns: they/them, she/her
From: Santa Cruisin' USA

Since last post: 56 days
Last activity: 4 days

Posted on 01-12-11 04:01:17 AM Link | Quote
I learned how to do all of that the way Darkdata outlined. Though I don't think we went into hexadecimal too much.

____________________

misterj
Member
Level: 32


Posts: 100/201
EXP: 197941
For next: 8501

Since: 02-15-09


Since last post: 11.0 years
Last activity: 10.8 years

Posted on 01-12-11 04:05:10 AM Link | Quote
Drag's method is still the same thing as DD's, it's just worded differently. I learned the same thing probably because that's how we all learned it, just using a different tool to make things click. For me, it was Drag's tool.

____________________
Lyskar
12210
-The Chaos within trumps the Chaos without-
Level: 192


Posts: 7662/12211
EXP: 99321497
For next: 552074

Since: 07-03-07

From: 52-2-88-7

Since last post: 7.4 years
Last activity: 7.3 years

Posted on 01-12-11 04:23:02 AM (last edited by Metal_Man88 at 01-12-11 01:23 AM) Link | Quote
Stats
Time/Date
01-11-11 10:23:02 PM
Posts
7662
Days Here
1288
Level
128
Metal_Man88's Post
Originally posted by Terra
I had a teacher who tried to explain it some other way involving a lot of division, and I was more confused.


I learned an unusual way that involves dividing by 2. Example:
DivisionResultRemainder
1234 / 26170
617 / 2 3081
308 / 21540
154 / 2770
77 / 2381
38 / 2190
19 / 291
9 / 241
4 / 220
2 / 210
1 / 201

Then you reverse the remainders to get your result, which in this case is 10011010010.

____________________
Eisnaught - SSQ² - Mobius Roleplay - SSS
Danika
6230
Level: 141


Posts: 5237/6235
EXP: 33298267
For next: 821747

Since: 10-23-09


Since last post: 1.2 years
Last activity: 1.2 years

Posted on 01-12-11 06:06:27 PM Link | Quote
00:00:00 Illumina Prevue Guide Emulator
POST #
5237
I pretty much do the conversion decimal-to-binary the same way as DD, and very similarly with hex too... other bases can be hard (such as odd-numbered ones), and you can also get octal out of this

For base 12, I do something similar but with 12s, 144s, 1728s, etc. instead of powers of 2 (replacing 10 with A and 11 with B)

____________________
TwitterYouTubeDeviantArtThe Left Mouse Button
"Meow!" ~a cute cat
Lyskar
12210
-The Chaos within trumps the Chaos without-
Level: 192


Posts: 7669/12211
EXP: 99321497
For next: 552074

Since: 07-03-07

From: 52-2-88-7

Since last post: 7.4 years
Last activity: 7.3 years

Posted on 01-12-11 10:33:16 PM Link | Quote
Stats
Time/Date
01-12-11 04:33:16 PM
Posts
7669
Days Here
1289
Level
128
Metal_Man88's Post
Oh, I almost forgot. The way I learned it can be switched to any base you want by dividing by a different number.

Crazy, isn't it?

(Base 8)

DivisionResultRemainder
1234 / 81542
154 / 8192
19 / 823
2 / 802


Result: 2322 in base 8.

2 * 1 = 2
2 * 8 = 16
3 * 64 = 192
2 * 512 = 1024
--------------
= 1234

____________________

Eisnaught - SSQ² - Mobius Roleplay - SSS
Darkdata
Ruins!? ♥
Level: 103


Posts: 2036/2892
EXP: 11446096
For next: 25310

Since: 07-04-07


Since last post: 202 days
Last activity: 10 days

Posted on 01-12-11 10:40:53 PM Link | Quote
Originally posted by Metal_Man88
Originally posted by Terra
I had a teacher who tried to explain it some other way involving a lot of division, and I was more confused.


I learned an unusual way that involves dividing by 2. Example:
DivisionResultRemainder
1234 / 26170
617 / 2 3081
308 / 21540
154 / 2770
77 / 2381
38 / 2190
19 / 291
9 / 241
4 / 220
2 / 210
1 / 201

Then you reverse the remainders to get your result, which in this case is 10011010010.


So, I assume you round down?

____________________

Raspberry
Thank you for my time here. I won't ever forget..
Level: 85


Posts: 1504/1823
EXP: 5726914
For next: 171626

Since: 07-07-07

Pronouns: she/her

Since last post: 1.0 years
Last activity: 77 days

Posted on 01-13-11 12:42:59 AM Link | Quote
 
Originally posted by Darkdata
So, I assume you round down?

If you do it the way MM88 showed, yes, you truncate the division (just like you would if you did long division by hand, actually ).

____________________
A Link to Nowhere...

Lyskar
12210
-The Chaos within trumps the Chaos without-
Level: 192


Posts: 7673/12211
EXP: 99321497
For next: 552074

Since: 07-03-07

From: 52-2-88-7

Since last post: 7.4 years
Last activity: 7.3 years

Posted on 01-13-11 04:23:21 AM Link | Quote
Stats
Time/Date
01-12-11 10:23:21 PM
Posts
7673
Days Here
1289
Level
128
Metal_Man88's Post
Yes.

My teacher worked on ballistic missiles and such. So he was able to teach the hard way by virtue of knowing his stuff--and how to teach people--something hard to come by.

____________________

Eisnaught - SSQ² - Mobius Roleplay - SSS
Next newer thread | Next older thread
Jul - Computers and Technology - Converting Binary (tall image) New poll - New thread - New reply


Rusted Logic

Acmlmboard - commit 47be4dc [2021-08-23]
©2000-2022 Acmlm, Xkeeper, Kaito Sinclaire, et al.

30 database queries.
Query execution time: 0.082524 seconds
Script execution time: 0.037518 seconds
Total render time: 0.120042 seconds