Introduction to Computer Lesson 7.0

Post on 14-Aug-2015

50 views 5 download

Transcript of Introduction to Computer Lesson 7.0

Introduction to Computer Lesson VII

By: Vhonz SugatanPOWER School

Last week…

Number System

Number System

Decimal to Binary Conversion of Fraction

Number System

Decimal to Binary Conversion of Real Values

Number System

Binary to Decimal Conversion of Real Values

Number System

Binary Addition

Number SystemBinary Subtraction

Number SystemBinary Subtraction

0 - 0 =

Number SystemBinary Subtraction

0 - 0 = 0

Number SystemBinary Subtraction

0 - 0 = 01 - 0 =

Number SystemBinary Subtraction

0 - 0 = 01 - 0 = 1

Number SystemBinary Subtraction

0 - 0 = 01 - 0 = 11 - 1 =

Number SystemBinary Subtraction

0 - 0 = 01 - 0 = 11 - 1 = 0

Number SystemBinary Subtraction

0 - 0 = 01 - 0 = 11 - 1 = 00 - 1 =

Number SystemBinary Subtraction

0 - 0 = 01 - 0 = 11 - 1 = 00 - 1 = 0

Number SystemBinary Subtraction

0 - 0 = 01 - 0 = 11 - 1 = 00 - 1 = 0 With a borrow of 1

Number SystemExample:

Number SystemExample:

1010

Number SystemExample:

1010100

Number SystemExample:

1010100

Number SystemExample:

1010100

Number SystemExample:

1010100

0

Number SystemExample:

1010100

0

Number SystemExample:

1010100

0

Number SystemExample:

1010100

10

Number SystemExample:

1010100

10

Number SystemExample:

1010100

10

Number SystemExample:

1010100

10

Number SystemExample:

1010100

10

2

Number SystemExample:

1010100110

2

Number SystemExample:

1010100110

20

Number SystemExample:

1010

Number SystemExample:

1010101

Number SystemExample:

1010101101

Number SystemExample:

1000111111

Number SystemExample:

1000111111

10100

Number SystemExample:

1000.1111.01

Number SystemExample:

1000.1111.01

101.10

Number SystemExample:

100001111

Number SystemExample:

100001111

1

Number SystemThe One’s Compliment Method

Number SystemThe One’s Compliment Method

11010

Number SystemThe One’s Compliment Method

11010 is 00101

Number SystemThe One’s Compliment Method

111101

Number SystemThe One’s Compliment Method

111101000010

Number SystemExample:

110011(Base2)

Number SystemExample:

110011(Base2)

11101(Base2)

Number SystemStep 1:

Number SystemStep 1:Get the one’s compliment of subtrahend

Number SystemStep 1:Get the one’s compliment of subtrahend.

The one’s compliment of 11101is 00010

Number SystemStep 2:

Number SystemStep 2:Get the binary sum of the minuend and the one’s compliment of the subtrahend.

Number SystemStep 2:Get the binary sum of the minuend and the one’s compliment of the subtrahend.

110011 + 00010 = 110101

Number SystemStep 3:

Number SystemStep 3:Add the and-around carry by taking the leftmost digit of the binary sum and adding it with the first digit.

Number SystemStep 3:

110101

Number SystemStep 3:

110101

Number SystemStep 3:

101011+

Number SystemStep 3:

101011+

10110

Number SystemStep 3:

101011+

10110

Number SystemBinary Multiplication

Number SystemBinary Multiplication

0 x 0 =

Number SystemBinary Multiplication

0 x 0 = 0

Number SystemBinary Multiplication

0 x 0 = 01 x 0 =

Number SystemBinary Multiplication

0 x 0 = 01 x 0 = 0

Number SystemBinary Multiplication

0 x 0 = 01 x 0 = 00 x 1 =

Number SystemBinary Multiplication

0 x 0 = 01 x 0 = 00 x 1 = 0

Number SystemBinary Multiplication

0 x 0 = 01 x 0 = 00 x 1 = 01 x 1 =

Number SystemBinary Multiplication

0 x 0 = 01 x 0 = 00 x 1 = 01 x 1 = 1

Number SystemExample

Number SystemExample 111

Number SystemExample 111

101x

Number SystemExample 111

101x111

Number SystemExample 111

101x111

000

Number SystemExample 111

101x111

000111

Number SystemExample 111

101x111

000111+

Number SystemExample 111

101x111

000111+

100011

Number SystemExample 101

Number SystemExample 101

101x

Number SystemExample 101

101x101

Number SystemExample 101

101x101

000

Number SystemExample 101

101x101

000101

Number SystemExample 101

101x101

000101+

Number SystemExample 101

101x101

000101+11001

Number SystemExample 11.00

Number SystemExample 11.00

10.10x

Number SystemExample 11.00

10.10x00 00

Number SystemExample 11.00

10.10x00 00

110 0

Number SystemExample 11.00

10.10x00 00

110 00000

Number SystemExample 11.00

10.10x00 00

110 00000

1100

Number SystemExample 11.00

10.10x00 00

110 00000

1100+

Number SystemExample 11.00

10.10x00 00

110 00000

1100+

1111000

Number SystemExample 11.00

10.10x00 00

110 00000

1100+

111.1000

Number SystemBinary Division

Number SystemBinary Division

0 / 1 =

Number SystemBinary Division

0 / 1 = 0

Number SystemBinary Division

0 / 1 = 01 / 1 =

Number SystemBinary Division

0 / 1 = 01 / 1 = 1

Number SystemBinary Division

0 / 1 = 01 / 1 = 11 / 0 =

Number SystemBinary Division

0 / 1 = 01 / 1 = 11 / 0 = is undefined

Number SystemExample

100 1100

Number SystemExample

100 1100

Number SystemExample

100 1100

Number SystemExample

100 1100

Number SystemExample

100 11001

Number SystemExample

100 11001

100

Number SystemExample

100 11001

100-

Number SystemExample

100 11001

100-10

Number SystemExample

100 11001

100-100

Number SystemExample

100 110011

100-100

Number SystemExample

100 110011

100-100100

Number SystemExample

100 110011

100-100100-

Number SystemExample

100 110011

100-100100-000

Number System

The Octal Number System

Number SystemDecimal to Octal Conversion

Number SystemDecimal to Octal ConversionExample:

Convert 56(base 10) to its octal equivalent.

Number SystemDecimal to Octal ConversionExample:

Division Quotients Remainders56 / 8

Number SystemDecimal to Octal ConversionExample:

Division Quotients Remainders56 / 8 7

Number SystemDecimal to Octal ConversionExample:

Division Quotients Remainders56 / 8 7 0

Number SystemDecimal to Octal ConversionExample:

Division Quotients Remainders56 / 8 7 07 / 8

Number SystemDecimal to Octal ConversionExample:

Division Quotients Remainders56 / 8 7 07 / 8 0

Number SystemDecimal to Octal ConversionExample:

Division Quotients Remainders56 / 8 7 07 / 8 0 7

Number SystemDecimal to Octal ConversionExample:

Division Quotients Remainders56 / 8 7 07 / 8 0 7

Number SystemDecimal to Octal ConversionExample:

56(base 10) is equivalent to 70(base8)

Number SystemDecimal to Octal Conversion

5687

560

Number SystemDecimal to Octal Conversion

8 7

Number SystemDecimal to Octal Conversion

8 7.0

Number SystemDecimal to Octal Conversion

8 7.00.

Number SystemDecimal to Octal Conversion

8 7.00.8

Number SystemDecimal to Octal Conversion

8 7.00.8

64

Number SystemDecimal to Octal Conversion

8 7.00.8

64

Number SystemDecimal to Octal Conversion

8 7.00.8

64

6

Number SystemDecimal to Octal Conversion

8 7.000.8

64

60

Number SystemDecimal to Octal Conversion

8 7.000.87

64

60

Number SystemDecimal to Octal Conversion

8 7.000.87

64

6056

Number SystemDecimal to Octal Conversion

8 7.000.87

64

6056

Number SystemDecimal to Octal Conversion

8 7.000.87

64

6056

4

Number SystemDecimal to Octal Conversion

8 7.0000.87

64

6056

40

Number SystemDecimal to Octal Conversion

8 7.0000.875

64

6056

40

Number SystemDecimal to Octal Conversion

8 7.0000.875

64

6056

4040

Number SystemDecimal to Octal Conversion

8 7.0000.875

64

6056

4040

0

Number SystemDecimal to Octal ConversionSeat Work

Number SystemDecimal to Octal ConversionSeat Work

1.) 171 base10 to base82.) 1254 base10 to base83.) 1573 base10 to base8

Number SystemOctal to Decimal Conversion

Number SystemOctal to Decimal ConversionExample:

Convert 70(base 8) to its decimal equivalent.

Number SystemOctal to Decimal ConversionExample:70 base8

7 0

Number SystemOctal to Decimal ConversionExample:70 base8

7 0x8 x8

Number SystemOctal to Decimal ConversionExample:70 base8

7 0x8 x8+

Number SystemOctal to Decimal ConversionExample:70 base8

7 0x8 x8+01

Number SystemOctal to Decimal ConversionExample:70 base8

7 0x8 x8+01

0

Number SystemOctal to Decimal ConversionExample:70 base8

7 0x8 x8+01

056

Number SystemOctal to Decimal ConversionExample:70 base8

7 0x8 x8+01

56 + 0

Number SystemOctal to Decimal ConversionExample:70 base8

7 0x8 x8+01

56 +56

0

Number SystemOctal to Decimal ConversionExample:

Convert 36471(base 8) to its decimal equivalent.

Number SystemOctal to Decimal ConversionExample:

3x8+6x8+4x8+7x8+1x801234

Number SystemOctal to Decimal ConversionExample:

3x8+6x8+4x8+7x8+1x801234

1

Number SystemOctal to Decimal ConversionExample:

3x8+6x8+4x8+7x8+1x801234

156

Number SystemOctal to Decimal ConversionExample:

3x8+6x8+4x8+7x8+1x801234

156256

Number SystemOctal to Decimal ConversionExample:

3x8+6x8+4x8+7x8+1x801234

1562563072

Number SystemOctal to Decimal ConversionExample:

3x8+6x8+4x8+7x8+1x801234

156256307212288

Number SystemOctal to Decimal ConversionExample:

3x8+6x8+4x8+7x8+1x801234

156256307212288 ++++

Number SystemOctal to Decimal ConversionExample:

3x8+6x8+4x8+7x8+1x801234

156256307212288 ++++

= 15673

Number SystemOctal to Binary Conversion

Number SystemOctal to Binary ConversionOCTAL

NUMBERBINARY

EQUIVALENT

0 000

1 001

2 010

3 011

4 100

5 101

6 110

7 111

Number SystemOctal to Binary ConversionExample:

Number SystemOctal to Binary ConversionExample:

Convert 13(base 8) to its binary equivalent.

Number SystemOctal to Binary ConversionExample:

1 (base8) in binary is equal to 001

Number SystemOctal to Binary ConversionExample:

1 (base8) in binary is equal to 001 3 (base8) in binary is equal to 011

Number SystemOctal to Binary ConversionExample:

1 (base8) in binary is equal to 001 3 (base8) in binary is equal to 011 Therefore 13 (base8) is equal

to 001011 or 1011

Number SystemOctal to Binary ConversionExample:

Convert 765(base 8) to its binary equivalent.

Number SystemOctal to Binary ConversionExample:

7 (base8) to binary is 111

Number SystemOctal to Binary ConversionExample:

7 (base8) to binary is 111 6 (base8) to binary is 110

Number SystemOctal to Binary ConversionExample:

7 (base8) to binary is 111 6 (base8) to binary is 110 5 (base8) to binary is 101

Number SystemOctal to Binary ConversionExample:

7 (base8) to binary is 111 6 (base8) to binary is 110 5 (base8) to binary is 101

Therefore 765 (base8) is equal to 111110101

Number SystemBinary to Octal Conversion

Number SystemBinary to Octal ConversionExample:

Convert 10101010(base2) to its octal equivalent.

Number SystemBinary to Octal ConversionStep 1:

Arrange the binary into groups of 3.

Number SystemBinary to Octal ConversionStep 1:

Arrange the binary into groups of 3.

10101010

Number SystemBinary to Octal ConversionStep 1:

Arrange the binary into groups of 3.

10101010

Number SystemBinary to Octal ConversionStep 2:

For each group, convert each digit to decimal by multiplying it by its positional value.

Number SystemBinary to Octal ConversionStep 2:GROUP CONVERSION TO OCTAL

010 0x2+1x2+0x2 = 2101 1x2+0x2+1x2 = 510 1x2+0x2 = 2

Number SystemBinary to Octal ConversionStep 2:GROUP CONVERSION TO OCTAL

010 0x2+1x2+0x2 = 2101 1x2+0x2+1x2 = 510 1x2+0x2 = 2

Number SystemBinary to Octal Conversion

Therefore the 10101010 (base2) is equivalent to 252 (base8)

Number System

The Hexadecimal

Number System