manual:chapter3:reals

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Next revision Both sides next revision
manual:chapter3:reals [2017/06/17 13:38]
smartin [Numbers]
manual:chapter3:reals [2019/06/24 13:18]
claudio [Bit operations]
Line 21: Line 21:
 ==== Numbers in other bases ==== ==== Numbers in other bases ====
  
-Numbers in different bases can be entered by preceeding the value with a ''#'' and a trailing letter to indicate the base (''b'' = binary, ''o'' = octal, ''d'' = decimal, ''h'' = hex, note that the trailing letter is case insensitive).  Arithmetic can be done on numbers in different bases with the result displayed as the base of the first argument.  Only exact numbers in the range $-2^{63}$ to $2^{63}-1$ can be expressed in multiple bases.  Outside this range (or approximate numbers) will be switched to decimal.+Numbers in different bases can be entered by preceeding the value with a ''#'' and a trailing letter to indicate the base (''b'' = binary, ''o'' = octal, ''d'' = decimal, ''h'' = hex, note that the trailing letter is case insensitive).  Arithmetic can be done on numbers in different bases with the result displayed as the base of the first argument.  Only exact numbers in the range $-2^{63}$ to $2^{63}-1$ can be expressed in multiple bases.  Outside this range will be switched to decimal.
  
 Here are example arithmetic operations in bases other than 10: Here are example arithmetic operations in bases other than 10:
Line 43: Line 43:
 |BSUB|Subtract| ''#11001b #100000b BSUB'' yields ''-#111b'' | |BSUB|Subtract| ''#11001b #100000b BSUB'' yields ''-#111b'' |
 |BMUL|Multiply| ''#11001b #100000b BMUL'' yields ''#1100100000b'' | |BMUL|Multiply| ''#11001b #100000b BMUL'' yields ''#1100100000b'' |
-|BDIV|Divide| ''#11001b #100000b BDIV'' yields ''0.781'' |+|BDIV|Divide| ''#11001b #100000b BDIV'' yields ''#0b'' |
 |BAND|Logical AND| ''#1101010b #1100010b BAND'' yields ''#1100010b'' | |BAND|Logical AND| ''#1101010b #1100010b BAND'' yields ''#1100010b'' |
 |BOR|Logical OR| ''#1101010b #1100010b BOR'' yields ''#1101010b'' | |BOR|Logical OR| ''#1101010b #1100010b BOR'' yields ''#1101010b'' |
  • manual/chapter3/reals.txt
  • Last modified: 2019/11/06 15:21
  • by jojo1973