Solutions to exercise session 1

Solutions to the calculations:

101 001 110 = 0516 (octal) = 334 (decimal) = 0x14e (hexadecimal)

07 + 05 = 014 (all numbers in octal)

0345 (octal) = 229 (decimal)

0x83ab (hexadecimal) = 1000 0011 1010 1011 (binary)

0x5 + 0x7 = 0xc

The Linux calculator

You should be able to calculate these exercises by hand! Once you know how to do this, have a look at the tools Linux offers you. It has a calculator which can be switched from basic mode

calculatorBasic.png

to programming mode in which case you can use it to perform all the calculations asked for.

calculatorProg.png

Comments

 
Topic revision: r1 - 17 Sep 2018, UliRaich