Trace:

converting_20binary_20coded_20decimal

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

converting_20binary_20coded_20decimal [2018/03/31 13:19] 127.0.0.1 external edit |
converting_20binary_20coded_20decimal [2018/04/17 15:21] (current) tbest3112 Added syntax highlighting |
||
---|---|---|---|

Line 2: | Line 2: | ||

//By JGH, April 2007//\\ \\ **B**inary **C**oded **D**ecimal (BCD) is a method of representing a decimal number as a hexadecimal value using the hex digits 0-9 and ignoring A-F. For example, the number 21 (hex &15) would be represented as &21 (decimal 33). It can be a convenient internal representation of decimal numbers as each hexadecimal digit can be displayed without any further processing. See [[http://en.wikipedia.org/wiki/Binary-coded_decimal|Wikipedia]].\\ \\ BCD values can be decoded with:\\ \\ | //By JGH, April 2007//\\ \\ **B**inary **C**oded **D**ecimal (BCD) is a method of representing a decimal number as a hexadecimal value using the hex digits 0-9 and ignoring A-F. For example, the number 21 (hex &15) would be represented as &21 (decimal 33). It can be a convenient internal representation of decimal numbers as each hexadecimal digit can be displayed without any further processing. See [[http://en.wikipedia.org/wiki/Binary-coded_decimal|Wikipedia]].\\ \\ BCD values can be decoded with:\\ \\ | ||

+ | <code bb4w> | ||

number% = VAL STR$~bcd% | number% = VAL STR$~bcd% | ||

+ | </code> | ||

\\ Numbers can be encoded in BCD using:\\ \\ | \\ Numbers can be encoded in BCD using:\\ \\ | ||

+ | <code bb4w> | ||

bcd% = EVAL("&"+STR$number%) | bcd% = EVAL("&"+STR$number%) | ||

+ | </code> |

converting_20binary_20coded_20decimal.1522502351.txt.gz ยท Last modified: 2018/03/31 13:19 by 127.0.0.1

Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 4.0 International