Number Systems Binary to Decimal Octal to Decimal Hexadecimal to Decimal Binary to Octal Binary to...

7
Number Systems Binary to Decimal Octal to Decimal Hexadecimal to Decimal Binary to Octal Binary to Hexadecimal Two’s Complement

Transcript of Number Systems Binary to Decimal Octal to Decimal Hexadecimal to Decimal Binary to Octal Binary to...

Page 1: Number Systems Binary to Decimal Octal to Decimal Hexadecimal to Decimal Binary to Octal Binary to Hexadecimal Two’s Complement.

Number Systems Binary to Decimal Octal to Decimal Hexadecimal to Decimal Binary to Octal Binary to Hexadecimal Two’s Complement

Page 2: Number Systems Binary to Decimal Octal to Decimal Hexadecimal to Decimal Binary to Octal Binary to Hexadecimal Two’s Complement.

Binary to Decimal

Rule 25‑1: In converting from binary to decimal, find the value or weight of the MSB. Work down to the LSB, adding the weight of that position if a 1 is present or a 0 if a 0 is present.

1012 = 1 x 22

+0 x 21

+1 x 20 = 510

Page 3: Number Systems Binary to Decimal Octal to Decimal Hexadecimal to Decimal Binary to Octal Binary to Hexadecimal Two’s Complement.

Octal to Decimal

Rule 25‑2: In converting from octal to decimal, find the weight of the digit in each position. Add the values of the digits in each position to determine the decimal equivalent.

4738 = 4 x 82

7 x 81

3 x 80 = 31510

Page 4: Number Systems Binary to Decimal Octal to Decimal Hexadecimal to Decimal Binary to Octal Binary to Hexadecimal Two’s Complement.

Hexadecimal to Decimal

Rule 25‑3: In converting from hexadecimal to decimal, find the weight of the digit in each position. Add the values of the digits in each position to determine the decimal equivalent.

2BC16 = 2 x 162

+11 x 161

+12 x 160 = 70010

Page 5: Number Systems Binary to Decimal Octal to Decimal Hexadecimal to Decimal Binary to Octal Binary to Hexadecimal Two’s Complement.

Binary to Octal

Key Point: To convert from binary to octal, separate the bits into 3‑bit groups, starting with the LSB and moving left to the MSB.

101101102 =

10 | 110 | 1102 =

= 2668

Page 6: Number Systems Binary to Decimal Octal to Decimal Hexadecimal to Decimal Binary to Octal Binary to Hexadecimal Two’s Complement.

Binary to Hexadecimal

Key Point: To convert from binary to hexadecimal, separate the bits into 4‑bit groups, starting with the LSB and moving left to the MSB.

100110112 =

1001|10112=

= 9B16

Page 7: Number Systems Binary to Decimal Octal to Decimal Hexadecimal to Decimal Binary to Octal Binary to Hexadecimal Two’s Complement.

Key Point: Computers subtract by using the two's complement method. The two's complement of the subtrahend is added to the minuend. The carry out of the MSB is ignored.

01100111 – 01001010

Solution:

01100111(+)10110110 (Two’s complement)

1 00011101 (Difference)

Two’s Complement