317 words - 2 pages

Gian Ciannavei

Lab 2: Number Conversion Lab

Task 1:

Below is an example that shows how to turn the decimal number ‘125’ into a binary number.

125/2=62 R1

62/2=31 R0

31/2=15 R1

15/2=7 R1

7/2=3 R1

3/2=1 R1

2/1=1 R1

Binary number = 1111101

Task 2:

Add correlating weights together to gain decimal value from binary number.

210/16=13 R2

13 (lsd) 2 (msd)

16-1 <weights

13-2 <Digits=D2

Next is an example of how to turn a hexadecimal into a decimal, in this case, back to ‘210’.

16*13=208 1*2=2

2+208=210

Note: You can also convert the decimal number into binary and turn the binary number into a hexadecimal.

210/2=105 R0

105/2= 52 R1

52/2=26 R0

26/2=13 R0

13/2=6 R1

6/2=3 R0

3/2=1 R1

½=1 R1

210=11010010

1101=13 0010=2

13(LSD) 2(MSD) =D2

Task 4:

Convert hexadecimal number E7 into a decimal.

14(LSD) 7(MSD) =E7

14*16=224 7*1=7

224+7=231

Gian Ciannavei; Lab2

Convert hexadecimal E7 into binary, and then back to decimal to check answers.

14(LSD) 7(MSD) =E7

14*16=224 7*1=7 224+7=231

231/2=115 R1

115/2=57 R1

57/2=28 R1

28/2=14 R0

14/2=7 R0

7/2=3 R1

3/2=1 R1

½=1 R1

Binary = 11100111

Find the perfect research document on any subject