Skip to content

Instantly share code, notes, and snippets.

@TheSaviourEking
Last active September 29, 2023 03:41
Show Gist options
  • Save TheSaviourEking/3a5fc9312546a62e7b13b2c16bf37cb9 to your computer and use it in GitHub Desktop.
Save TheSaviourEking/3a5fc9312546a62e7b13b2c16bf37cb9 to your computer and use it in GitHub Desktop.

Binary Practice

Binary to base 10

  1. ob1010 => 10
  2. ob0011 => 3

Binary to hexadecimal

  1. ob1010 => 0x10
  2. ob0011 => 0x3

Hexadecimal to base 10

  1. 0xa1 => 161
  2. 0xff => 255

Hexadecimal to binary

  1. 0xa1 => 10100001
  2. 0xff => 11111111

Base 10 to binary

  1. 8 => 1000
  2. 24 => 11000
  3. 255 => 11111111

Base 10 to hexadecimal

  1. 8 => 8
  2. 24 => 18
  3. 255 => ff

Base 10 to ASCII

  1. 65 => A
  2. 66 => B
  3. 97 => a
  4. 98 => b

Hexadecimal to ASCII

  1. 0x41 => A
  2. 0x42 => B
  3. 0x61 => a
  4. 0x62 => b

Binary to ASCII

  1. 0b01000001 => A
  2. 0b01000010 => B
  3. 0b01100001 => a
  4. 0b01100010 => b
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment