bin->dec and dec->bin app

Computer builds, hardware and software discussion or troubleshooting, including peripherals. Essentially a general place to talk about desktop computers.
Locked
User avatar
Red Squirrel
Posts: 29209
Joined: Wed Dec 18, 2002 12:14 am
Location: Northern Ontario
Contact:

bin->dec and dec->bin app

Post by Red Squirrel »

I wanted to make it faster to do all the binary conversion homework I had so I wrote a program that does it for me and shows the work. :P

Figured I'd share it for fun of it.

Edit: fixed a floating point issue, all good now. :D

Attachement (click to open)

Archived topic from Iceteks, old topic ID:3791, old post ID:30757
Honk if you love Jesus, text if you want to meet Him!
User avatar
Death
Posts: 7919
Joined: Thu Sep 30, 2004 10:12 pm

bin->dec and dec->bin app

Post by Death »

Neat stuff, but your programs doesn't like decimal places. Apparently, 132.42 and 392.43 both equal 1111111 in binary :P. I'm guessing you fixed that with the floating point number issue but forgot to repost the new attachment?

Archived topic from Iceteks, old topic ID:3791, old post ID:30761
User avatar
Red Squirrel
Posts: 29209
Joined: Wed Dec 18, 2002 12:14 am
Location: Northern Ontario
Contact:

bin->dec and dec->bin app

Post by Red Squirrel »

Oh it's not even suppost to support that, the floating point issue was that big numbers got written out in scientific notation but when I fixed that then it showed .000000 so I fixed that too. The . probably causes it to return some weird number or something.

Archived topic from Iceteks, old topic ID:3791, old post ID:30771
Honk if you love Jesus, text if you want to meet Him!
jellyfish
Posts: 129
Joined: Sat Jan 22, 2005 9:40 pm

bin->dec and dec->bin app

Post by jellyfish »

I had to learn Binary at uni today, they don't let us use calculators or anything like that...have an exam in it on monday apparently (it does actually count towards my final degree).

Archived topic from Iceteks, old topic ID:3791, old post ID:30774
User avatar
Red Squirrel
Posts: 29209
Joined: Wed Dec 18, 2002 12:14 am
Location: Northern Ontario
Contact:

bin->dec and dec->bin app

Post by Red Squirrel »

Yeah we have to be able to do it too without any type of tools. personally I don't see the point of that since in real world you have access to base converters and such.

Archived topic from Iceteks, old topic ID:3791, old post ID:30775
Honk if you love Jesus, text if you want to meet Him!
Locked