How to change bases?
|
04-27-2019, 06:52 PM
(This post was last modified: 04-27-2019 07:14 PM by Albert Chan.)
Post: #12
|
|||
|
|||
RE: How to change bases?
(04-10-2019 12:46 AM)toml_12953 Wrote: To convert 45 base 8 to base 16 you could nest converts like this: I can not get used to digits in reversed order, so I flip it: btb(lst, b1, b2) := reverse(convert(polyEval(lst, b1), base, b2)) btb([4,5], 8, 16) → [2,5], or 0x25 Example, decimal 123 to base 2 btb([1,2,3], 10, 2) or btb([123], 10, 2] → [1,1,1,1,0,1,1], or 0b1111011 |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 1 Guest(s)