Presentation is loading. Please wait.

Presentation is loading. Please wait.

Computer Systems Nat 4/5 Computing Science Lesson 1: Binary.

Similar presentations


Presentation on theme: "Computer Systems Nat 4/5 Computing Science Lesson 1: Binary."— Presentation transcript:

1 Computer Systems Nat 4/5 Computing Science Lesson 1: Binary

2 Lesson Aims  By the end of this lesson:  You will be able to: Describe what an integer is Represent positive integers in binary using up to 8 Bits State three advantages of the binary number system Represent negative numbers using binary (Nat 5) Represent real numbers using binary (Nat 5)

3 The Decimal & Binary Systems  We use the decimal(denary) or base 10 system  This means we have 10 digits : 0-9  Computers use the binary or base 2 system  There are only two digits: 0 and 1  Each figure is known as a bit  Bi nary digi t Nat 4/5 Off and On Because of our ten fingers?

4 Decimal Numbers  Lets look at how a decimal number is made up: 173  Technically this is: Nat 4/5 HundredsTensUnits HundredsTensUnits 173

5 Binary Numbers  Because Binary is only made up of two digits (0 and 1) instead of 10 (as in Decimal), the column headings will be different.  This is represented as: Nat 4/

6 Binary Numbers  Lets look at how 173 is stored in binary: Nat 4/  The binary number is calculated by adding together the value of the columns with a 1.  =  = 173

7 How to convert from Binary 1. Create your table with the values in the top 2. Insert your binary value into the table 3. Add the place values that have a binary 1 in them: = 102 Nat 4/

8 Advantages of the Binary system There are less rules of arithmetic, this makes it easier to program. 0’s and 1’s are easier to represent digitally in computer systems. Any drop in voltage does not affect the data. Nat 4/5

9 Advantages of Binary: 1.There are less rules of arithmetic. 2.0’s and 1’s are easier to represent. 3.Any drop in voltage doesn’t effect data. Summary  Binary only has two values– 0 & 1  A single 0 or 1 is known as a bit  Binary Digit  The place values in binary start on the right at 1 and double every time going to the left. Nat 4/5

10 What about negative numbers?  Integers include:-  -123, -89, 0, 45, , etc  Positive and negative integers are represented using two’s complement Nat 5

11 Two’s complement  Write -7 :-  +7 using 8 bits  Change 1’s and 0’s  Add  So -7 is Nat 5

12 Twos complement tasks  Questions 1 and 2 on Worksheet 1a Nat 5

13 Real numbers  Decimal Fractions:-  1/10 1/100 1/1000 …. As a fraction  …. As a decimal  Binary Fractions:-  ½ ¼ 1/8  ….as a fraction  ….as a decimal Nat 5

14 Real numbers task  Question 3 on Worksheet 1a

15 Floating point representation  From Maths we know that:-  = x 10 2  Mantissa x Base Exponent  In binary :-  = = x in decimal is 101 in binary

16 Floating point representation  The computer stores the mantissa & exponent of a real number  x  Mantissa =  Exponent = 101 Nat 5

17 Floating point task  Question 4 Worksheet 1a Nat 5

18


Download ppt "Computer Systems Nat 4/5 Computing Science Lesson 1: Binary."

Similar presentations


Ads by Google