convert bin/oct/dec/hex


JavaScript

2:
8:
10:
16:


Emacs Lisp

in *scratch* buffer, input and C-j or C-x C-e

2 -> 8: (format "%o" #b101010)
2 -> 10: (format "%d" #b101010)
2 -> 16: (format "%x" #b101010)
8 -> 2: no "%b"
8 -> 10: (format "%d" #o15)
8 -> 16: (format "%x" #o15)
10 -> 2: no "%b"
10 -> 8: (format "%o" 128)
10 -> 16: (format "%x" 128)
16 -> 2: no "%b"
16 -> 8: (format "%o" #x1f)
16 -> 10: (format "%d" #x1f)

or

2 -> 10(,8,16): #b101010
8 -> 10(,8,16): #o15
10 -> 10(,8,16): 128
16 -> 10(,8,16): #x1f


home > tools > convert bin/oct/dec/hex