Hex

Hexadecimal (also base 16, or hex) is the base-16 positional numeral system, using the 16 symbols 0–9 and A‒F.

Octal

The octal numeral system, or oct for short, is the base-8 numeral system, using the digits 0 to 7

Others

Example |
---|

Itshifts just go easier with hexadecimal than decimal and is often more convenient to read than octal;bitshifts boils down to whoever wrote the code you re reading probably thought hex from question Hex values in Protocol headers |

Apparently octal format was from question Why fcntl() flag values are defined in Octal format & how this function works for blocking/non-blocking sockets? From what i understand octal was from question Can you encode values expressed as binary digits directly in the c-family of languages? |

27 is the decimal ascii value for escape but you use an octal character code;you should say 27 or 033 or x1b for hex from question How to use Escape Key to end a Loop in C |

Hex from question Why doesn't C have binary literals? |

The octal encoding mechanism is from question Telnet Session using Expect Module fails to send command ctrl+A |

N all-true-bits byte 1111 1111 is 377 in octal but ff in hex;hex from question Where did the octal/hex notations come from? |

And octal from question Where did the octal/hex notations come from? |