Operations on hex, bin or oct bases.

700 views
Skip to first unread message

Jorge Pérez

unread,
Oct 26, 2010, 3:05:58 PM10/26/10
to speed...@googlegroups.com
Hi, first of all thanks for this great calculator.
Does Speedcrunch allow operations with fractionals on hex, bin or oct base?.
Example:
I can put on the calculator 15,45 on decimal base, but when i try to put a number as 111001,100 the program returns an error.
I tried putting the "E" command to but the program returns the same error.
If this function not exist will be implemented in a future version?
Can i do something for use this "function" now?
Thanks for all and please sorry about my english.

Gudy

unread,
Oct 27, 2010, 4:01:03 PM10/27/10
to speed...@googlegroups.com
binary octal, and hex are integers, if you are programming any
microcontroller then you will use it a lot
a floating point binary= not existing :)
but if you want to know how a floating point number is represented in
binary, its like scientific notation of normal numbers
so 15.45 will be 1545 *10^-2

hope this helps
gudy


On Tue, 26 Oct 2010 14:05:58 -0500, Jorge Pérez <jorgep...@gmail.com>
wrote:


--
Using Opera's revolutionary email client: http://www.opera.com/mail/

Frederic Da Vitoria

unread,
Oct 27, 2010, 5:04:33 AM10/27/10
to speed...@googlegroups.com
I am not sure you are right, Gudy. Traditionally, binary, octal and hex are used as integers, but mathematically, I can't see why we would be forbidden to write non-integers in a binary, octal or hexadecimal base.

2010/10/27 Gudy <jazzcomm...@gmail.com>


--
You received this message because you are subscribed to the Google Groups "speedcrunch" group.
To post to this group, send email to speed...@googlegroups.com.
To unsubscribe from this group, send email to speedcrunch...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/speedcrunch?hl=en.




--
Frederic Da Vitoria
(davitof)

Membre de l'April - « promouvoir et défendre le logiciel libre » - http://www.april.org

Jorge Pérez

unread,
Oct 27, 2010, 10:18:49 AM10/27/10
to speed...@googlegroups.com
Thanks for the answer, but i know it previosly ^^.
I'm studiying at the university and i normally use this calculator for make the operations that i must to resolve on the execercices that my teacher send in class. I know that in the real life the hex, oct and bin numers dont use the floating point, but in the class i need to make changes of the bases with or without "decimals" or fractions. I think that if i can write the numbers as: x * b^+-y (x is the number and b the base), but i think its a nice solution too made it posible directly as x,x in Oct,Bin,Hex.

As the program can made the transform for a decimal number and show in the screen the number in other base with floating point i suposse that will be a form that implement the inverse situation (put a number in one base with floating point and see this number in other base)

Thanks for the answers ^^

Gudy

unread,
Oct 27, 2010, 6:34:54 PM10/27/10
to speed...@googlegroups.com
binary are numbers 0f 2^2 isn't it? same as octal(represents 3bits) and
hex (represent 4 bits)
if you're not familiar with programming then try in excel to do the
conversion of 15.45 to hex or binary
if its not giving an error, then it will show only 15 or 16 (if you
convert it back to decimal) never a floating point :)

tell me your results :)

here is a link to floating point library of microchip for 8 bit
microprocessors
http://www.microchip.com/stellent/idcplg?IdcService=SS_GET_PAGE&nodeId=1824&appnote=en010961
read the pdf an575
this is how all microprocessors are using floating point calculations no
matter if this is hard programmed in a floating point co-processor(fast),
or done entirely in software(slow), its like this already 40 years :))

best regards

>> speedcrunch...@googlegroups.com<speedcrunch%2Bunsu...@googlegroups.com>


>> .
>> For more options, visit this group at
>> http://groups.google.com/group/speedcrunch?hl=en.
>>
>>
>
>


--

Gudy

unread,
Oct 27, 2010, 4:31:43 PM10/27/10
to speed...@googlegroups.com

..by the way microchip has a free floating point library to use for its
micro controllers, pic16f84a for example
you can read the application note(try :) ) don't worry if you not
understand it... continue reading.. at the end you have an idea how it
works

hope you like to learn new things :) and that i've feed your curiosity a
bit

keep reading :)
gudy

On Tue, 26 Oct 2010 14:05:58 -0500, Jorge Pérez <jorgep...@gmail.com>
wrote:

> Hi, first of all thanks for this great calculator.

00575.pdf

Frederic Da Vitoria

unread,
Oct 27, 2010, 6:37:37 PM10/27/10
to speed...@googlegroups.com
Yes and no :-) In computers, you are right. But in the more general mathematical world, binary is just a numerical base, just like 10, so that you can express fractional numbers in binary just as well as in decimal. I may be wrong, but for example 2.5 (decimal) should translate to 10.1 binary.

2010/10/28 Gudy <jazzcomm...@gmail.com>

--
Reply all
Reply to author
Forward
0 new messages