Menu
Is free
check in
the main  /  Navigators / Arithmetic and logical components of the computer. Summary: Arithmetic Fundamentals of ECM

Arithmetic and logical bases of the computer. Summary: Arithmetic Fundamentals of ECM

a) Logical Fundamentals of Computer

Algebra logic - This is the section of mathematics learning the statements considered by their logical values \u200b\u200b(truth or falsity) and logical operations over them.

Logic algebra arose in the middle of the nineteenth century in the works of English mathematics George Bul. Its creation was an attempt to solve traditional logical tasks with algebraic methods.

Logical statement - This is a narrative needlement, in the rest of the maintenance, it is necessary to say, true about it is true or located.

So, for example, the offer " 6 - even number"It should be considered a statement, as it is true. Offer" Rome - the capital of France"Also say, as it is false.

Of course, not any proposal is a logical statement. Statements are not, for example, suggestions " student of the tenth class"And" informatics - an interesting subject". The first offer does not approve anything about the student, and the second uses too uncertain concept" interesting subject". Questionative and exclamation deals are also not statements, since it makes sense to talk about their truth or falsity.

Suggestions like " in the town A. More than a million inhabitants", "he has blue eyes"Are not statements, as to clarify their truth or falsity, additional information is needed: what particular city or a person are talking about. Such suggestions are called spring forms.

Logic algebra considers any statement only from one point of view - whether it is true or false. notice, that often it is difficult to establish the truth of the statement. So, for example, the statement " the surface area of \u200b\u200bthe Indian Ocean is 75 million square meters. KM"In one situation, you can calculate false, and in the other - true. False - since the specified value is inaccurate and is not constant at all. True - if we consider it as some approximation acceptable in practice.

Common speech words and phrases "not", "and", "or", "if ..., then", "then and only then" And others allow from the already specified statements to build new statements. These words and phrases are called logical ligaments.

Suiters formed from other statements using logical ligaments are called composite. Statements that are not composite are called elementary.

So, for example, from elementary statements " Petrov - doctor", "Petrov - Chess player"With the help of a bundle" and"You can get a composite statement" Petrov - doctor and chess player", understood as" Petrov - a doctor who played chess".



With the help of a bundle " or"From the same statements you can get a composite statement" Petrov - doctor or chess player", understood in the algebra of logic as" Petrov or doctor, or chess player, or a doctor and chess player at the same time".

The truth or the falsity of the compound statements obtained in this way depends on the truth or the falsity of elementary statements.

To refer to logical statements, they are prescribed names. Let it be too BUT Indicated statement "Timur will go to the sea in the summer", And around IN - Saying "Timur will go to the mountains in the summer." Then composite statement "Timur will be at sea and in the mountains" You can briefly record as A and B.. Here "and" - logic bunch A, B. - Logic variables that will only take two values \u200b\u200b- "truth" or "lies", indicated, respectively, "1" and "0".

Each logical bunch is considered as an operation on logical statements and has its name and designation:

NOT Word Operation "not", called denial And drawn by the point above the statement (or sign). The statement is true when A is false, and false when A is true. Example. " The Moon is the Earth's satellite" (BUT); " The moon is not a satellite" ().

AND "and", called conjunction (Lat. Conjunctio - connection) or logical multiplication and denotes the point " . " (may also be marked with signs or & ). Statement A. B. True then and only when both statements BUT and IN True. For example, saying "10 is divided by 2 and 5 more than 3" True, and statements "10 is divided into 2 and 5 no more than 3", "10 is not divided into 2 and 5 more than 3", "10 is not divided into 2 and 5 no more than 3" - false.

OR Operation expressed by a bundle "or" (in the non-exclusive sense of the word), called disjunction (Lat. Disjunctio - separation) or logical addition and is indicated by the sign v. (or plus). Statement A V B. Falsely then and only when both statements and in false. For example, saying "10 is not divided into 2 or 5 no more than 3" falsely and statements "10 is divided by 2 or 5 more than 3", "10 is divided into 2 or 5 no more than 3", "10 is not divided by 2 or 5 more than 3" - True.

If something Operation expressed by bundles "If ..., then", "from ... follows", "... entails ...", called implication (Lat. implico. - Tightly related) and is indicated by the sign. Saying falsely then and only when BUT True, A. IN falsely.

The mathematical apparatus of the logic algebra is very convenient to describe how the computer hardware function is function, since the main number of the number in the computer is the binary, in which the numbers 1 and 0 are used, and the values \u200b\u200bof logical variables are also two: "1" and "0".

From this follows two outputs:

1. The same computer devices can be used for processing and storage of both numerical information provided in a binary number system and logical variables;

at the design of the hardware, the logic algebra can significantly simplify the logical functions describing the functioning of the computer circuits, and, therefore, reduce the number of elementary logical elements, of tens of thousands of which the main components of the computer consist.

Logical element of computer - This is part of the electronic logic of the circuit that implements the elementary logical function.

Logical elements of computers are electronic circuits and, or, not, not, or not and others (called also valves), as well as trigger.

Using these schemes, you can implement any logical function describing the operation of the computer devices. Usually, the valves sometimes happen from two to eight inputs and one or two outputs.

To present two logical states - "1" and "0" in the valves corresponding to them input and output signals have one of two installed voltage levels. For example, +5 volts and 0 volts.

The high level usually corresponds to the value of "truth" ("1"), and the low - the "lies" value ("0").

Each logical element has its own conventional designation, which expresses its logical function, but does not indicate which the electronic circuit in it is implemented. It simplifies the recording and understanding of complex logic schemes.

The logical elements are described using truth tables.

Topic number 2. Arithmetic and logical foundations of a personal computer

Plan

3.1. Number systems

3.3. Binary arithmetic

4. Coding information

4.1. Encoding numerical information

4.3. Coding graphic information

5. Logic Basics of Personal Computer

5.2. Logic laws and rules of transformation

1. The amount of information as a measure to reduce the uncertainty of knowledge

The process of knowledge can be visually depicted as an expanding circle of knowledge. Outside this circle lies area of \u200b\u200bignorance.

If a message leads to a decrease in knowledge uncertainty, they say that this message contains information. This allows you to quantify information. For example, before throwing a coin, there is an uncertainty of knowledge (two equivalent events are possible - "Eagle" or "Rush", as a coin falls - impossible to guess). After throwing, complete certainty comes, since we get a visual message about the result. This message reduces the uncertainty of knowledge twice, since one of the possible two events was realized.

Measure of the uncertainty of experience in which random events are manifested, equal to the average uncertainty of all possible outcomes, is calledentropy.

In fact, it is often quite common to occur when a greater number of equally accurate events may occur (throwing a playing cube - 6 events). The larger the initial number of probabilistic events, the greater the initial uncertainty of knowledge and the more information will contain a message about the results of experience. In other words, with other things being equal conditions, the greatest entropy has experience with even-way outcomes.

Unit of information - Bit, such a number of information that reduces the uncertainty of knowledge by twice.

In the described experience with the throw of the coin, the amount of information obtained is 1 bit.

There is a formula that binds among them the number of possible events N and the amount of information I.

N \u003d 2 i

From mathematics it is known that the solution of such an equation has the form:

I \u003d log 2 n

Example: There are 32 balls in the lottery draw drum. How much information contains a message about the first dropping issue?

2 i \u003d 32

I \u003d 5.

Example: You came to the traffic light when yellow light burned. After that, the green caught fire. What amount of information did you get?

N \u003d 2 i

N \u003d 2 (may turn around both red and green color), hence i \u003d 1 bits.

Example: You came to the traffic light when the red light was burning. After that, the yellow caught fire. What amount of information did you get?

The amount of information is 0, since with a good traffic light after red, yellow light should light up.

There are many situations where possible events have different probabilities. The formula for calculating the number of information for events with various probabilities suggested K. Shannon in 1948

where i is the amount of information;

N - the number of possible events;

p I. - Probability of individual events.

2. Units of information measurement

Bit is the minimum unit of measurement of information, can take values \u200b\u200b0 or 1.

The combination of eight bits is called byte.

In computing technology, any information regardless of its nature is presented in binary form, so the main units of information measurement are bits and bytes.

For measuring large amounts of information, derivatives of measurement units are used:

1 kb \u003d 1024 byte

1MB \u003d 1024 KB

1 GB \u003d 1024 MB.

3. Arithmetic Basics of Personal Computer

3.1. Number systems

Notation- a set of rules and receptions of the number of numbers using a set of digital signs (alphabet).

Distinguish two types of number systems:

Positional - the value of each digit is determined by its place (position) in the number of numbers.

Non-procurement - the value of the numbers in the number does not depend on its place in the record of the number.

The number of numbers used in the number system is called the base of the number system. In decimal, S.S. 10 digits from 0 to 9, binary S.S. has 2, because Uses two digits 0 and 1.

In the positional systems, the numbers can be recorded in the deployed form, i.e. In the form of the amount of product numbers of this number on the base of the number system to the degree determined by the sequence number, the numbers are among the right left, starting from zero.

5341 10 = 5*10 3 +3*10 2 +4*10 1 +1*10 0

3.2. Translation of numbers from one number system to another

1. Translation of numbers from a number system with any base in decimal.

To transfer the number from S.S. With any reason in the decimal, it is necessary to present the number in the deployed form and calculate the amount.

10100101 2 =1*2 7 +0*2 6 +1*2 5 +0*2 4 +0+2 3 +1*2 2 +0*2 1 +1*2 0 =165 10

For the translation of fractional numbers, they act on the same algorithm, given that the fractional part will have negative degrees of the foundation.

101,101 2 =1*2 2 +0*2 1 +1*2 0 +1*2 -1 +0*2 -2 +1*2 -3 =4+0+1+0,5+0,+0,125 =5,625 10

2. To transfer an integer from decimal to S.S. With any reason, It is necessary to share this number on the basis of S.S., remembering the remnants. When the private will become less divisor (base S.S.), the division stops, and this private becomes the older number of the desired number. Then all the remnants are recorded in the reverse order.

Example : Transfer the number 25 to the binary number system.

25: 2 \u003d 12 (OST. 1)

12: 2 \u003d 6 (Ost.0)

6: 2 \u003d 3 (Ost.0)

3: 2 \u003d 1 (OST.1)

25 10 =11001 2

3. To translate a fractional number of decimal S.S. To another, you need:

1. Multiply a fractional number on the base of the new S.S.

2. Separately write down the whole part of the resulting number.

3. If the fractional part of the resulting number is not zero, or the required accuracy of the calculations is not achieved, then with the fractional part, repeat operations 1 and 2.

4. The resulting parts of the works make up the desired fraction in the sequence in which they were obtained.

Example: Translate decimal fraction 0,625 to binary system.

0,625 * 2 \u003d 1.25 (whole part - 1, fractional part - 0.25)

0.25 * 2 \u003d 0.5 (Whole part - 0, fractional part - 0.5)

0.5 * 2 \u003d 1 (whole part - 1, fractional part - 0)

We make a binary fraction from the integers from top to bottom, pre-writing 0 to the integer part: 0,101.

If in the original decimal fraction there is a whole, and fractional parts, then separately it is necessary to translate it into an integer by dividing the number of the number system and the fractional part - by multiplying on the base of the new number system. Then write them through the comma.

25,625 10 =11001,101 2

4. Translation of numbers from binary to octal and hexadecimal S.S.

Matching tables are used to translate.

Binary number It is necessary to decompose on the right to the left of the numbers of three to translate into the octal system and four to transfer to the hexadecimal system. If necessary, you can add to the left of insignificant zeros.

Then compare these groups on the tables.

Compliance of binary and octal numbers

2 S.S.

8 S.S.

Compliance of binary and hexadecimal numbers

0000

0001

0010

0011

0100

0101

0110

0111

1000

1001

1010

1011

1100

1101

1110

1111

Example: Translate binary number 1010111112 In the octal and hexadecimal systems:

101011111 2 = 101 011 1112 = 537 8

5 3 7

101011111 2 \u003d 0001 0101 1112 \u003d 15F 16

1 5 F.

5. Translation of numbers from octal and hexadecimal to binary S.S.

Translation is carried out according to the tables of conformity in the opposite direction. The resulting number is recorded without spaces and insignificant zeros.

246 8 = 2 4 6 = 1100110 2

001 100 110

37D 16 \u003d 3 7 d \u003d 1101111101 2

0011 0111 1101

3.3. Binary arithmetic

1. Addition is made in accordance with the following rules:

0+0=0

0+1=1

1+0=1

1 + 1 \u003d 10 (0 and one in the senior category)

Example:

2. Subtraction is made according to the following rules:

1 way.

0-0=0

10-0=1

1-0=1

1-1=0

Example:

2. Method.

It is possible to consider subtraction as the addition of a positive number with a negative number. In a computer for representing negative numbers, an additional code is used, which is obtained by replacing units with zeros and vice versa and subsequent addition of a unit to younger.

11 2 -111 2 =

We replace 111 to 000, add a unit, get 001.

We fold 11 + 001 \u003d 1100, the senior discharge is a sign of the number, we get 100.

4. Coding information

When presenting information in various forms or converting it from one form to another, information is encoded.

Code - Conditional Symbols System for information presentation.

Coding is an operation of converting symbols or a group of single code characters into symbols or a group of symbols of another code.

In computing technology, binary coding is used. This is explained by the ease of implementing such a method of coding from a technical point of view: 1 - there is a signal, 0 - no signal.

4.1. Encoding numerical information.

To work with numbers, use mostly two forms for their recording -natural (Native to write numbers) and exponential (for writing very large or very small numbers).

The number A in any number system in exponential form is written as follows:

A \u003d MQ N

where M is the mantissa of the number (should have a normalized form, i.e. be the correct fraction with a digit after a comma different from zero);

q is the basis of the number system;

n - order of number

For example, 1.3 * 10 16 \u003d 130000000000000 \u003d 1.3Е16

1.3 * 10 -16 \u003d 0.000000000000013 \u003d 1.3E-16

In programming languages \u200b\u200band in computer applications, when recording numbers in an exponential form, instead of the foundation of the number 10, the letter E is written, instead of the comma put a point, and the multiplication sign is not put.

1. Representation of integers

In total, the comma is fixed strictly at the end and remains strictly fixed, so this format is called a fixed point format. The integers are stored in the memory of the computer in a natural form. The range of values \u200b\u200bof integers representing in the memory of the computer depends on the size of the memory cells used for their storage. 2 can be stored in the K-discharge cellk various values \u200b\u200bof integers.

Example: Determine the range of stored numbers at a 16-bit memory cell.

2 16 =65536

If the numbers are only positive, then the range ranges from 0 to 65535.

If positive and negative numbers are stored, the range is equal to -3276 to 32767.

To teach the internal representation of a whole positive numberN, storen in the K-discharge machine word, you need:

1. Transfer the number N to the binary number system.

2. The result obtained to add to the left insignificant zeros to
k discharges.

Example: Get the internal representation of an integer number 1607 in a 2-byte cell.

N \u003d 1607 10 \u003d 110 0100 0111 2

Supplement left insignificant zeros:

N \u003d 0000 0110 0100 0111

To record the internal representation of a whole negative number(-N) need:

1. Having obtained the internal representation of the integer positive number (N)

  1. Get the reverse code for this number replacement 0 to 1 and 1 to 0
  2. To the resulting result, add 1

Example: Get the internal representation of a whole positive number -1607

  1. N \u003d 0000 0110 0100 0111
  2. Copyright code: 1111 1001 1011 1000
  3. Grade Result 1: 1111 1001 1011 1001

2. Presentation of numbers in exponential form.

The numbers recorded in exponential form are floating point numbers. The internal representation of the real number is reduced to the representation of a pair of integers: mantissa and order.

Table

Internal representation of the real number

4.2. Coding text information

To encode text information, use code tables of characters, where each character (letter, digit, etc.) is assigned a specific code - a decimal number in the range from 0 to 255. Traditionally, 1 byte is required for encoding one symbol. All over the world, the American Standard is accepted as a standard - ASCII Table (American Standard Code for Information Interchange). This table encodes only the first 128 characters (i.e., characters with numbers from 0 to 127). The remaining 128 codes are used to encoding the symbols of the national alphabet, pseudographic and scientific symbols.

A limited set of 256 characters today is no longer quite satisfying the increased requirements of international communication. Recently, a new international standard Unicode has appeared, which takes no one to each symbol, and two bytes, and therefore it can be encoded from it 256, a n \u003d 216 \u003d 65536 different characters.

Example: What is the information text programming in 16-bit encoding (Unicode) and 8-bit encoding?

The number of characters in this text is 16, thus, when encoding in Unicode, the amount of information will be equal to 16 * 2 \u003d 32 bytes, and with 8-bit encoding - 16 bytes.

4.3. Coding graphic information.

In the process of encoding the image, its spatial discretization is made. The image is divided into separate small fragments (points), and each point is assigned to its color, i.e. Color code.

The image coding quality depends on the size of the points and the number of colors.

Graphic information on the monitor screen is represented as a bitmap image, which is formed from a certain number of rows, which, in turn, contain a certain amount of pixels (minimum image elements).

Screen resolution- The size of the raster grid represented as a product M (number of horizontal points) on N (number of vertical points).

The number of colors played on the display screen (N) and the number of bits assigned to video memory under each pixel (I) are related to the formula:

N \u003d 2 i

In the simplest case, each screen point (black and white image without gray gradation) can have one of two states (black or white), respectively, 1 bits required to store its state. (N \u003d 2I)

Color images are formed in accordance with the binary code of the color of each point stored in the video memory.

Color depth (bit depth)- The number of bits required for color color coding.

Page - Section of video memory, which enlists information about one screen. In the video memory, several pages can be placed at the same time.

Table

Color depth and number of colors displayed

Color depth (I)

Number of colors displayed (N)

2 4 =16

2 8 =256

16 (High Color)

2 16 =65536

24 (True Color)

2 24 =16777216

Example: Only black and white images are displayed on the resolving ability screen 640x200. What amount of memory is required to store the image?

The bitch depth of the black and white image is 1, and the video memory, at least, should accommodate one page, the volume of video memory is equal to

640x200x1 \u003d 28000bit \u003d 16000 byte

Example: What volume of video memory is necessary to store four pages of the image, provided that the resolution of the screen is 640x480, colors used - 32.

N \u003d 2 i \u003d 32 \u003d 2 5 , color depth 5 bits

640 * 480 * 5 * 4 \u003d 6144000 BIT \u003d 750 KB

4.4. Encoding audio information

The physical nature of sound is oscillations in a specific frequency range transmitted by the sound wave with a continuously changing amplitude and frequency. The more the amplitude of the signal, the more louder for a person, the higher the frequency of the signal, the higher the tone. To the computer can handle the sound, the continuous beep must be converted to the sequence of electrical pulses (binary 0 and 1).

In the process of encoding the phonogram, a continuous beep is sampled. The continuous sound wave is divided into separate small temporary sections, and a certain amplitude is installed for each site.

A sound digitization performs a special device on the sound card, the ADC (analog-to-digital converter), the reverse process - playback of the encoded sound is performed using a digital analog converter (DAC).

Each step is assigned the value of the sound volume level, its code. The greater the steps, the greater the amount of volume levels will be highlighted during the encoding process and the more information will be the value of each level and will sound better.

The sound quality depends on the two characteristics:

Depth of sound coding (I) -the number of bits used to encode various signal levels or states.

Modern sound cards provide a 16-bit sound coding depth, and the total number of different levels will be then: n \u003d 26 =65536

Discretization frequency (m)- Number of measurements of the sound signal level per unit of time. Measured in Hertz. One dimension in 1 second corresponds to a frequency of 1 Hz, 1000 measurements per second \u003d 1 kHz. M can take a value from 8 (radiotranslation) to 48 kHz (audio-CD).

To find the amount of sound information, you need to use the formula:

V \u003d M * I * T

where M is the sampling frequency

I - coding depth

t - Sound time

Example: The sound is reproduced for 10 seconds at a discretization frequency of 22.05kHz and the depth of the audio 8 bits. Determine the size of the sound file.

M \u003d 22.05 * 1000 \u003d 22050 Hz

1 \u003d 8/8 \u003d 1 byte

t \u003d 10 seconds

V \u003d 22050 * 10 * 1 \u003d 220500 byte

2.5. Logic Basics of Personal Computer

The absence of errors in reasoning is possible only when the laws of logic are strictly followed.Logics - This is the science of the forms and laws of human thinking and, in particular, on the laws of evidence-based reasoning.

Formal logic contains some basic concepts, such as: the statement, the truth of the statement and conclusion.

Statement - A grammatically correct narrative offer, which can be said, is truly or not. The statements are denoted by the letters of the Latin alphabet. It is usually believed that the statement can take two meanings: truth or false, their English equivalents are true or false, often use binary numbers 1 (truth) or 0 (lies).

Output - reasoning according to the rules of logic, during which a new statement (conclusion) is obtained from the initial statements (parcels).

Simple statements contain only one statement, complex statements contain several statements. Formulas that express the dependence of the value of a complex statement from simple statements from it, a logical expression, consider as logical variables.

Tank truthshows which values \u200b\u200bis a logical expression with all possible combinations of logical variables.

5.1. Basic logic operations

At the heart of the processing of a computer of information lies the logic algebra, developed by the English Mathematics George Bul. The logic algebra identifies actions on statements, the execution of which leads to new statements.

1. Denial operation (inversion).

Logical denial changes the value of the statement to the opposite. Denotes"", "¬ a", not, read "not a".

Table

Tank truth for inversion operation.

Circuit implementations of logical operations are called logic elements or valves. The valve is not (inverter) has one input and one output, the unit at the input gives zero at the output and vice versa.

Fig. Logic valve schemeNOT.

2. Operation of logical multiplication (conjunction).

The statement obtained as a result of conjunction is true then and only if all initial statements are true. Denotes both, "x", "∧ "," & ", and.

Table 2.6. Tatac of truth for conjunction operation.

A ∧ B.

At the output of the logical element andit turns out a unit only if there were units on both entrances.

Logic valve schemeAND.

3. Operation of logical addition (disjunction).

The statement obtained as a result of disjunction is true then and only if it is truly at least one of the initial statements. Designated either, "+", "v", or.

A ∧ B.

At the output of the logical element or it turns out zero, only when logic zero signals are fed to all of its inputs, in all other cases, a logical unit appears at the output.

Logic valve scheme or.

This valve is also called "Including OR", since if there is a truth value on both of its inputs, the value of the truth also appears at the output.

4. Implication operation.

Allows you to get a complex statement of two simple and grammatical design "If, then ...".

Such a complex statement is called conditional statement. The portion of the implication coming after the word "if" is calledbase, parcel or anteceedent.The portion of the implication coming after "That", called Consequence, conclusion or consequent.

The implication is false if and only if the parcel is true, and the conclusion is false, in other cases the implication of the truth. Marked signs "→ », « ⊃ ».

Tatac of truth for operation of disjunction.

A → B.

5. Equivalence operation.

Via Equivalence operations can be obtained complexsaying from two implications. Such a statement contains the words "if and only if", "then and only then when." Equivalence is true if both statements have the same values \u200b\u200b(both truths or both are false).

Marked signs "↔ », « ≡ ».

A ↔ B.

6. Operation excluding or.

The result is true only if a or in (but not a and c) are true. Otherwise, this operation is called denying equivalence. Denotes xor.

At the output of the logical elementexcluding or it turns out a logical unit, only when one of the input signals is equallogical unit, and the rest - logical nolo.

Tatac of truth for equivalence operation.

AxORV

Logical valve scheme excluding or.

7. Operation and is one.

↓ ».

Tatac of truth for operation or - not.

Noorv

At the output of the logical element or - the logical unit does not work, only when the logical zero signals are fed to all its inputs, in any other cases, a logical zero is obtained at the output.

Scheme of logical valve or - not.

8. Operation and not.

The result of this operation will be the value of truth, only when one or both of the statements take the value of the lie. Denotes or - not, "⏐ ", Nand.

At the output of the logical element or - the logical zero is not obtained only when the logical unit signals are fed to all of its inputs, in any other cases, a logical unit is obtained at the output.

The result of this operation is the truth only when both statements are simultaneously false. Denotes or - not, Nor, "I ".

Table 2.11. Tatac of truth for operation or - not.

Anorb.

Scheme of logical valve and not.

5.2. Logic laws I.passed conversion.

5.2.1. Laws algebra logic

The law of identity:any statement identifies itself.

A ≡ A.

The subject of the discussion must be strictly defined and should not change until the end of the discussion. An example of violation of this law may be a substitution of concepts when, for example, programming is interpreted as the only content of computer science.

Law non-contradiction:the approval and its denial cannot be simultaneously true.

A ∧ \u003d 0

An example of contradictory assertion can serve as a statement "It's raining, and on the street dry."

The law of an excluded third:the statement can be or true, or false, the third is not given.

A ∨ \u003d 1

Dual denial law:if denial of approvalfalsely that initial statement is true, in other words, twice the applied negation operation gives the initial statement.

A \u003d A.

1. Transformation rules.

Laws de Morgana.

2. Right of commutation.

From the change of places of the terms, the amount does not change.

The work does not change from change places of factors.

Associativity rules.

(AUW) Us \u003d AU (VUS) (A & B) & C \u003d A & (B & C)

  1. Right-handed distribution.(A & B) V (A & C) \u003d A & BVC (AVB) & (AV C) \u003d AV (B & C)
  2. Rightst idempotency.AVA \u003d A.

A & A \u003d A

6. The absorption theorems.
AUA & B ^ in

AW A 8C V \u003d AW in

A & (AW) \u003d a

A8C (AW c) \u003d A & in

AVL \u003d L A & 1 \u003d A AVO \u003d A A & 0 \u003d 0

The order of logical operations descending the seniority is the following: negation, conjunction, disjunction, implication, equivalence.

i.

4.2. What integers follow numbers:

[Answer]

4.4. What digitum ends an even binary number? What digit does an odd binary number ends? What figures may end an even tricious number?
[Answer]

4.5. What the greatest decimal number can be written by three numbers:

o a) in the binary system;

o b) in the octal system;

o c) in a hexadecimal system?

4.6. In which number system 21 + 24 \u003d 100?

Decision. Let X be the desired base of the number system. Then 100 x \u003d 1 · x 2 + 0 · x 1 + 0 · x 0, 21 x \u003d 2 · x 1 + 1 · x 0, 24 x \u003d 2 · x 1 + 4 · x 0. Thus, x 2 \u003d 2x + 2x + 5 or x 2 - 4x - 5 \u003d 0. The positive root of this square equation is x \u003d 5.
Answer. The numbers are written in a five-packed system.

4.7. Which number system is right as follows:

o a) 20 + 25 \u003d 100;

o b) 22 + 44 \u003d 110?

4.8. The decimal number 59 is equivalent to the number 214 in some other number system. Find the base of this system.
[Answer]

4.9. Translate numbers into the decimal system, and then check the results by performing reverse translations:

[Answer]

4.10. Translate numbers from the decimal system to binary, octal and hexadecimal, and then check the results by performing reverse translations:

a) 125 10; b) 229 10; c) 88 10; d) 37.25 10; e) 206,125 10.
[Answer]

4.11. Move the numbers from the binary system to an octal and hexadecimal, and then check the results by performing reverse translations:

a) 1001111110111,0111 2; d) 1011110011100,11 2;
b) 1110101011,1011101 2; e) 101111111101111 2;
c) 10111001,101100111 2; e) 1100010101,11001 2.

[Answer]

4.12. Translate hexadecimal numbers into binary and octaous systems:

a) 2Se 16; b) 9F40 16; c) abcde 16; d) 1010,101 16; e) 1ABC, 9D 16.
[Answer]

4.13. Write the integers:

o a) from 101101 2 to 110000 2 in the binary system;

o b) from 202 3 to 1000 3 in the trophic system;

o c) from 14 8 to 20 8 in the octal system;

o d) from 28 16 to 30 16 in a hexadecimal system.

4.14. For decimal numbers 47 and 79, perform a chain of transfers from one number system to another:

[Answer]

4.15. Make up the formation tables of unambiguous numbers in the Tropic and Patracaidial Number Systems.
[Answer]

4.16. Make the multiplication tables of unambiguous numbers in the Tropic and Patracaidial Number Systems.
[Answer]

4.17. Fold numbers, and then check the results by performing the appropriate decimal additions:

[Answer]

4.18. In which number systems follow the following additions? Find the bases of each system:

[Answer]

4.19. Find those substitutions of decimal numbers instead of letters that make the proposed results issued (different figures are replaced by different letters):

[Answer]

4.20. Substitute:

[Answer]

4.21. Multimate the numbers, and then check the results by performing the appropriate decimal multiplications:

a) 101101 2 and 101 2; d) 37 8 and 4 8;
b) 111101 2 and 11.01 2; e) 16 8 and 7 8;
c) 1011,11 2 and 101.1 2; g) 7.5 and 1.6 8;
d) 101 2 and 1111.001 2; h) 6.25 8 and 7.12 8.

[Answer]

4.22. Divide 10010110 2 per 1010 2 and check the result by multiplying the divider to the private one.
[Answer]

4.23. Divide 10011010100 2 to 1100 2 and then perform the appropriate decimal and octal division.
[Answer]

4.24. Calculate the values \u200b\u200bof the expressions:

o a) 256 8 + 10110.1 2 * (60 8 + 12 10) - 1F 16;

o b) 1ad 16 - 100101100 2: 1010 2 + 217 8;

o c) 1010 10 + (106 16 - 11011101 2) 12 8;

o d) 1011 2 * 1100 2: 14 8 + (100000 2 - 40 8).

4.25. Place the following numbers in Ascending order:

o a) 74 8, 110010 2, 70 10, 38 16;

o b) 6E 16, 142 8, 1101001 2, 100 10;

o c) 777 8, 101111111 2, 2FF 16, 500 10;

o d) 100 10, 1100000 2, 60 16, 141 8.

4.26. Record the decreasing number of numbers +3, +2, ..., -3 in one-way format:

o a) in direct code;

o b) in reverse code;

o c) in the additional code.

4.27. Record the number in the direct code (1 byte format):

a) 31; b) -63; c) 65; d) -128.
[Answer]

4.28. Write down the numbers in the opposite and additional codes (1 byte format):

a) -9; b) -15; c) -127; d) -128.
[Answer]

4.29. Find decimal representations of the numbers recorded in the additional code:

a) 1 1111000; b) 1 0011011; c) 1 1101001; d) 1,0000000.
[Answer]

4.30. Find decimal numbers recorded in reverse code:

a) 1,1101000; b) 1 0011111; c) 1 0101011; d) 1,0000000.
[Answer]

4.31. Perform the subtraction of numbers by adding their reverse (additional) codes in 1 bytes format. Specify, in what cases there is a discharge mesh overflow:

a) 9 - 2; d) -20 - 10; g) -120 - 15;
b) 2 - 9; e) 50 - 25; h) -126 - 1;
c) -5 - 7; e) 127 - 1; and) -127 - 1.

[Answer]

Lecture 4. Arithmetic foundations of computers