Skip to content

Instantly share code, notes, and snippets.

@jhunt
Created September 9, 2016 14:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jhunt/d58d4b4c898cdb43a0da27556422051e to your computer and use it in GitHub Desktop.
Save jhunt/d58d4b4c898cdb43a0da27556422051e to your computer and use it in GitHub Desktop.
hex calculator session mockup
hex calculator 0x002
Copyright (c) James Hunt <hc@jameshunt.us>
Type `help' to read the manual.
Type `quit' or `exit' to quit.
> 0x00ff12 + 12
0xff1d
> FLAG_A = 0x01
> FLAG_B = 0x02
> FLAG_C = 0x04
> FLAG_D = 1 << 3
> 0x04 | FLAG_B
0x06
> FLAG_A | FLAG_B | FLAG_C | FLAG_D
0x0f
> oct f
017
> hex 017
0x0f
> dec 0xf
15
> bin 0xf
0000 1111
> ascii 0x0a
'\n'
> display bin hex dec ascii oct
> 0x0a
0000 1010
0x0a
10
'\n'
012
> labels
> 0x0a
b: 0000 1010
h: 0x0a
d: 10
a: '\n'
o: 012
> 'A' + 5
0100 0110
0x46
70
'F'
0106
> display bin
> 'A' + 5
b: 0100 0110
> labels off
> 'A' + 5
0100 0110
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment