This is a read-only archive of the old Scratch 1.x Forums.
Try searching the current Scratch discussion forums.

#1 2012-02-07 06:20:03

scimonster
Community Moderator
Registered: 2010-06-13
Posts: 1000+

Convert numbers to other bases!

I made a program to convert a number in decimal to a different base, or radix.
The project converts a number in decimal (base ten [the number system we generally use]) to a different base.
A base is a unit of counting. In a base, when a place value equals the base number, it resets the place value, and changes the next value by 1. Bad explanation, I know.
Some common bases are base 2 (binary), base 16 (hexadecimal), and base 12 (duodecimal). This project allows converting to any base between 1 and 36. Bases that go above the standard numbers (013456789) are represented with letters (ABCDEFGHIJKLMNOPQRSTUVWXYZ).
A note about reading numbers in bases other than decimal: each digit is read individually. Thus, the number 100 in binary (4 in decimal), is read as "one zero zero", not "one hundred". F in hexadecimal (15 in decimal) is read as "F".
Enjoy converting your numbers!

Play with it!

Last edited by scimonster (2012-02-07 09:36:09)

Offline

 

#2 2012-02-07 06:43:15

rdococ
Scratcher
Registered: 2009-10-11
Posts: 1000+

Re: Convert numbers to other bases!

scimonster wrote:

I made a program to convert a number in decimal to a different base, or radix.
The project converts a number in decimal (base ten [the number system we generally use]) to a different base.
A base is a unit of counting. In a base, when a place value equals the base number, it resets the place value, and changes the next value by 1. Bad explanation, I know.
Some common bases are base 2 (binary), base 16 (hexadecimal), and base 12 (duodecimal). This project allows converting to any base between 1 and 36. Bases that go above the standard numbers (013456789) are represented with letters (ABCDEFGHIJKLMNOPQRSTUVWXYZ).
A note about reading numbers in bases other than decimal: each digit is read individually. Thus, the number 100 in binary (4 in decimal), is read as "one zero zero", not "one hundred". F in hexadecimal (15 in binary) is read as "F".
Enjoy converting your numbers!

Play with it!

I spotted a mistake!
Mistake: 15 is not a valid binary number.

Offline

 

#3 2012-02-07 09:36:45

scimonster
Community Moderator
Registered: 2010-06-13
Posts: 1000+

Re: Convert numbers to other bases!

rdococ wrote:

scimonster wrote:

I made a program to convert a number in decimal to a different base, or radix.
The project converts a number in decimal (base ten [the number system we generally use]) to a different base.
A base is a unit of counting. In a base, when a place value equals the base number, it resets the place value, and changes the next value by 1. Bad explanation, I know.
Some common bases are base 2 (binary), base 16 (hexadecimal), and base 12 (duodecimal). This project allows converting to any base between 1 and 36. Bases that go above the standard numbers (013456789) are represented with letters (ABCDEFGHIJKLMNOPQRSTUVWXYZ).
A note about reading numbers in bases other than decimal: each digit is read individually. Thus, the number 100 in binary (4 in decimal), is read as "one zero zero", not "one hundred". F in hexadecimal (15 in binary) is read as "F".
Enjoy converting your numbers!

Play with it!

I spotted a mistake!
Mistake: 15 is not a valid binary number.

Oops.  tongue  What did you think of the project itself?

Offline

 

#5 2012-02-07 13:10:42

scimonster
Community Moderator
Registered: 2010-06-13
Posts: 1000+

Re: Convert numbers to other bases!

Thanks!

Offline

 

#6 2012-02-11 13:48:05

scimonster
Community Moderator
Registered: 2010-06-13
Posts: 1000+

Re: Convert numbers to other bases!

Bump.

Offline

 

Board footer