Representation of integers in PC memory (Grade 8). Representation of integers in PC memory (Grade 8) II

training

Dear users! Please note that most of the animated videos work correctly only in Internet browser Explorer!!!

Device personal computer

Interactive simulator 2

Interactive simulator 1to the topic: Personal computer device (grade 8)

Number encoding. Number systems

Interactive training apparatusconverting numbers from decimal to binary

Interactive training apparatusto convert numbers from binary to decimal

Interactive training apparatusto convert numbers from decimal to octal

Interactive training apparatusto convert numbers from decimal to hexadecimal

Interactive training apparatusto convert numbers from binary to octal

Interactive training apparatusto convert numbers from binary to hexadecimal

Interactive simulators to translate numbers with bases 2, 8, 10, 16

Interactive training №1 on the topic: Coding numbers. Number systems.

Interactive training on the topic: Execution arithmetic operations in various number systems.

Binary representation of negative numbers in computer memory. Direct problem (training )

Binary representation of negative numbers in computer memory. Inverse problem (training)

Signed integers. Representation of numbers in computer memory. Double byte code.(training)

Tasks for decoding informationtraining

To coding of graphics

Color mixing (color palette generator)training .

Color Coding Taskstraining .

Performers

Performer Robot presentation -training .

Algorithms and programs (Programming language Pascal)

Interactive training №1 to process the assignment operator.
Interactive training number 2 to work out the solution of direct problems.

Interactive training №3 to work out the solution of inverse problems.

Logics

Solving logical problems by reasoning (4 neighbors)training №1 .
Solving logical problems by reasoning (who lied)training number 2 .

Interactive training to study the concept inversion.

Interactive training to study the concept conjunction.

Interactive training to study the concept disjunction.

Interactive

Technological map of the lesson. Bosova L.L., Bosova A.Yu. Informatics. 8th grade. GEF.

The date __________________________________

Lesson 5. Representation of integer and real numbers in PC memory.

Lesson Objectives:

subject - formation of ideas about the structure of computer memory: memory - cell - bit (bit);

metasubject - understanding the limitations on the range of values ​​​​of quantities in the calculations;

personal - understanding the role of fundamental knowledge as the basis of modern information technologies.

Solved educational tasks:

1) consolidation of skills in operating with numbers presented in various positional number systems;

2) familiarity with the structure of computer memory;

3) consideration of unsigned data, areas of their application and methods of representation in computer memory;

4) consideration of the representation of signed integers;

5) consideration of the normal (scientific, exponential) form of recording real numbers;

6) consideration of the floating point format;

1

Organizing time

The children are seated. Check for accessories.

Personal UUD:

- formation of self-organization skills

Recording homework.

§ 1.2 RT. №62-65

Working with diaries

Homework Check + Oral Review

    RT. No. 43 (visually

    oral repetition:

    What number systems are used in computers?

    What is the advantage of storing numerical information in 8-ary and 16-ary systems over the binary system?

    What is the alphabet of the 8-ary system?

    What is the alphabet of the hexadecimal system?

    What is the essence of the algorithm for writing numbers in expanded form? What does this lead to?

    What is the essence of the algorithm for converting a decimal number to any number system?

2,8,16;

Save space in PC memory;

0-7;

0-9, A-F;

The number is decomposed into bit terms, the number is translated into the decimal number system;

Division by the base of the system, writing out the remainder

Regulatory UUD:

- formation of a conscious approach to performance evaluation.

Formulating the topic and objectives of the lesson (1 point for each answer)

Remember how characters are represented in PC memory?

Think about how numbers are represented in PC memory?

Yes, you are right, numerical information, like any other, is stored and processed by a computer in a binary system. But there are rules for storing and processing numbers. In the lesson, we should learn how numbers are represented in the PC memory and the topic of our lesson:

Lesson objectives:

- to know:

- learn to:

Binary codes are stored in encoding tables;

- write down the number in other number systems;

Probably also in binary;

- "Representation of numbers in a computer";

- on the representation of numbers in the PC memory;

Write numbers in computer representation.

Communicative UUD:

Development of communication skills with peers and adults in the process of activity.

Personal UUD:

- formation of mathematical thinking

Regulatory UUD:

The ability to set a learning task, name a goal, formulate a topic in accordance with the norms Russian language,

Topic Explanation

Learn about computer representation of numbers

Make a baseline:

Watch video;

Work with the textbook p. 1.2

Cognitive UUD:

-

Personal UUD:

- the formation of literate writing skills, the formation of information search skills in an existing source.

Cognitive UUD:

- development of cognitive activity

Personal UUD:

- formation of problem solving skills

Regulatory UUD:

- ability to apply acquired knowledge in practice

Anchoring

Do it with the teacher

RT. No. 66.67

Computer workshop

Complete with the training simulator, write in a notebook

Work with the interactive simulator "Numbers in PC memory"

The results of the lesson, grading.

Can you name the topic of the lesson?

Was it easy for you or were there difficulties?

What did you do best and without mistakes?

Which task was the most interesting and why?

How would you rate your work?

    L.L. Bosova, A.Yu. Bosova "Informatics Grade 8". Binomial. 2015.

    L.L. Bosova, A.Yu. Bosova. Methodical manual. Grade 7-9

Class: 9

Presentation for the lesson


















Back forward

Attention! Preview slides are for informational purposes only and may not represent the full extent of the presentation. If you are interested this work please download the full version.

Lesson Objectives:

  • Educational:
    • repeat the concept of the number system;
    • repeat the rules for transferring from any number system to the 10th and from the 10th number system to any;
    • repeat the translation rules between the 2nd, 8th and 16th number systems using the method of triads and tetrads;
    • give an idea about the representation of positive and negative numbers in computer memory and the features of working with integers;
    • give an idea of ​​the capacity of a memory cell and the range of values ​​of numbers;
    • to give an idea about the representation of real numbers in computer memory and the features of the computer's work with real numbers.
  • Educational:
    • develop attention, logical thinking, the ability to analyze, compare, draw conclusions.
  • Educational:
    • education of information culture of students;
    • instill interest in the subject of computer science;
    • instill skills independent work;
    • education of students' activity.

Forms of organization of students in the lesson: individual, frontal

Used equipment: computers, interactive whiteboard

Software: presentation for the lesson, test.

DURING THE CLASSES

I. Organizational moment

Greeting, checking written homework.

II. Actualization of acquired knowledge

For other students, a frontal survey.

Questions for the frontal survey:

- What is a number system?
- How many digits are used in the 2nd, 8th, 10th, 16th number systems, list which ones.
– Convert the number 345 8 to the 10th number system.
– Convert the number 451 10 to the 16th number system.
– Translation of the number 1011001101 2 into the 8th and 16th number systems using triads and tetrads.

III. Learning new material(Presentation )

All information in the computer memory is represented in binary form, i.e. using zeros and ones. Initially, computers could only work with numbers. Now these are numbers, texts, images, sound, video. Working with data of any type comes down to processing binary numbers - numbers written using two digits - 0 and 1. Hence the name - "Digital Technologies".
There are two types of numerical values ​​in a computer: integers and real numbers. There are different ways of representing numbers in computer memory.
They're called:

  • fixed-point form (applies to integers)
  • floating point form (applies to real numbers)

Representing Integers in Fixed-Point Form

The part of computer memory that stores a single number is a cell. The minimum size of a cell where an integer can be stored is 8 bits or 1 byte.
Let's represent the number 42 10 in the binary number system, and then imagine how this number will look in the computer's memory.
42 10 = 101010 2 .

Let's write down the received number in an eight-digit cell. The cell is written from the end, that is, the last digit of the number is written to the last digit of the cell, then the penultimate digit to the penultimate digit of the cell, and so on until the number ends. Free digits on the left are filled with zeros.

0 0 1 0 1 0 1 0

The most significant digit (first from the left) - stores the sign of the number. If the number is positive, then this bit is 0, if negative - 1.

Thus, the largest positive number that can be entered into an eight-bit grid is:

0 1 1 1 1 1 1 1

And this number is 1111111 2 = 127 10
The maximum positive integer that can fit in an 8-bit cell is 127.

Consider the representation in computer memory of integer negative numbers

Two's complement is used to represent negative integers.
An additional number code can be obtained by knowing the following algorithm:

  1. Write down the internal representation of the corresponding positive number
  2. Write the return code of the received number by replacing 0 with 1 in all digits, and 1 with 0.
  3. Add 1 to the resulting number.

Let's imagine the internal representation of the number - 42 10 in an eight-digit cell: 42 10 \u003d 101010 2

1) 00101010
2) 11010101 is the return code
3) + 1
11010110 received the representation of the number - 42 10 in an eight-digit cell.

The most significant digit is set to 1 automatically. A unit in the highest order is a sign of a negative number.
Let's add the numbers 42 and - 42. Should get 0, check:

00101010
11010110
100000000 received a number whose most significant bit is outside the eight-bit cell, so the eight-bit cell is filled with zeros, i.e. the resulting number is 0.

The representation of an eight-digit negative number - X complements the representation of the corresponding positive number X to the value 2 8 . Therefore, the representation of a negative integer is called two's complement.

The range of representation of integers in an eight-digit cell:

– 128 < X < 127 or -2 7 < X < 2 7 – 1

We looked at the representation of integers using an 8-bit cell as an example, but there are also 16-bit and 32-bit cells.

In a 16-row cell, you can get numbers in the range:

– 2 15 < X < 2 15 - 1 or - 32768 < X < 32767

In a 32-bit cell, you can get numbers in the range:

– 2 31 < X < 2 31 - 1 or - 2147483648 < X < 2147483647

The general formula for a range of integers, depending on the bit depth N of the cell:

– 2 N–1 < X < 2 N–1–1

Representation of integers in floating point form.

Real numbers are the same as real numbers. From the course of mathematics, you know that the real numbers include integers and fractional numbers.
Any real number X is written as a product mantissa m and the base of the number system p to some integer power n, which is called the order:

For example, the number 25.324 = 0.25324 10 2
mantissa m = 0.25324, n = 2 - order. The order indicates how many positions and in which direction the decimal point in the mantissa should be shifted.
Most often, a 32-bit or 64-bit cell is used to store real numbers in computer memory. In the first case it will be with ordinary precision, in the second case with double precision. A cell stores two numbers in the binary system: the mantissa and the exponent.
The range of real numbers is limited, but it is much wider than when representing integers in fixed-point form.
For example, when using a 32-bit cell, this range is:

–3.4 10 38 < X < 3.4 10 38

The results of machine calculations with real numbers contain an error. With double precision, the error is reduced. Out of range (overflow) results in a processor interrupt.

IV. Consolidation of the studied material

Complete independently tasks No. 3 (a, b) and No. 4 (a, b) on page 105 of the textbook, followed by verification

a) Write the internal representation of the number 32 into an eight-digit cell 32 10 = 100000 2

So the internal representation of the number 32 in an eight-digit cell: 00100000

b) Write the internal representation of the number -32 to an eight-bit cell
32 has the representation 00100000
Reverse code 11011111
+1
11100000
So the internal representation of the number -32 in an eight-digit cell: 11100000

a) Determine which decimal number corresponds to the binary code 00010101 of the eight-digit representation of an integer.

We see that the first digit is 0, which means the number is positive.

Let's translate the number 10101 2 into the decimal number system:

1 2 4 + 0 2 3 + 1 2 2 + 0 2 1 + 1 2 0 = 16 + 4 + 1 = 21 10

So the binary code 00010101 is the eight-bit representation of the integer 21 10 .

b) Determine which decimal number corresponds to the binary code 11111110 of the eight-digit representation of an integer.

We see that the first digit is 1, which means the number is negative. To find the decimal number, let's execute the two's complement algorithm in reverse order, namely:

1) Subtract from given number 1

11111110
– 1
11111101

2) Replace 1 with 0 and 0 with 1

3) Let's translate the binary number 10 2 into the decimal number system.

10 2 = 1 2 1 + 0 2 0 = 2

Thus, the binary code 11111110 is the eight-bit representation of the integer 2 10 .

Exercise: represent a real number

a) 0.0050589; b) 1234.0456

in normalized decimal floating point form.

a) 0.0050589 = 0.50589 10 -2
b) 1234.0456 = 0.12340456 10 4

V. Summary of the lesson

- Today in the lesson you learned how numbers are stored in the computer memory. How the range of values ​​​​of numbers depends on the size of the cell in which the number is stored.
Grading for the lesson (test and assignments No. 3, No. 4)

VI. Homework

Paragraph 17, questions 1, 2, assignments No. 3 (c, d), No. 4 (c, d) /

A computer