Convert from Text to Octal

Convert from Text to Octal

The relationship between ASCII encoded text and the oct value of the characters is described in the ASCII table. It descripes the mapping between each character and a 7 bit value, with will be converted to oct.

Example: M => octal
M => 77 (with ASCII Table)
77 / 8^2 = 77 / 64 = 1 (first oct digit)
77 % 8^2 = 13
13 / 8^1 = 13 / 8 = 1 (second oct digit)
13 % 8^1 = 5
5 / 8^0 = 5 / 1 = 5 (third oct digit)
5 % 8^0 = 0
=> 0o115 (= 77)