Operators

NPTEL-NOC IITM
23 Aug 201921:26

Summary

TLDRThe video script delves into the concept of operators, explaining their significance and various types such as arithmetic, assignment, relational, logical, and bitwise in programming. It illustrates how operators perform calculations, comparisons, and manipulations with examples, emphasizing their role in enhancing code functionality and clarity. The discussion also touches on operator precedence and associativity, guiding viewers on the correct order of operations and logical expressions in programming.

Takeaways

  • 😀 The lecture introduces the concept of operators and operands, explaining their roles and usage in various operations within programming languages like Python.
  • 🔢 It covers different types of operators including arithmetic, assignment, relational, logical, and bitwise, each serving a specific purpose in computations and comparisons.
  • 📚 Arithmetic operators are discussed with examples of addition, subtraction, multiplication, and division, demonstrating how they perform basic mathematical operations on variables.
  • ➕ The addition operator is highlighted, showing how it combines two values to produce a sum, and its symbolic representation with a plus sign.
  • 📉 The subtraction operator is explained, indicating its use in determining the difference between two values and its representation with a hyphen.
  • 🔄 The multiplication operator is described, illustrating how it scales one value by another, denoted by an asterisk.
  • ➗ Division is another arithmetic operation covered, which is used to split a value into equal parts, represented by a forward slash.
  • 🔒 Relational operators are introduced to compare two values for equality, greater than, less than, and other relations, with boolean results of True or False.
  • 🤖 Logical operators are explained, including AND, OR, and NOT, which are used to combine conditions or statements in a program, also yielding boolean outcomes.
  • 🛠 Bitwise operators are discussed for their use in manipulating binary representations of numbers, with operations like AND, OR, and XOR affecting individual bits.
  • 👉 The precedence of operators is outlined, emphasizing that certain operations like parentheses have higher priority and are evaluated first in expressions.

Q & A

  • What is the main topic of the lecture?

    -The main topic of the lecture is the concept and types of operators in programming, including arithmetic, assignment, relational, logical, and bitwise operators.

  • What are the different types of operators discussed in the lecture?

    -The lecture discusses various types of operators such as arithmetic, assignment, relational, logical, and bitwise operators.

  • Can you explain the role of an operator in programming?

    -In programming, an operator is a special symbol that represents an operation or an action. It is used to manipulate data and perform operations on variables and values.

  • What is an operand in the context of operators?

    -An operand is a value or a variable on which the operator performs an operation. It comes before and after the operator in an expression.

  • How are arithmetic operators used in expressions?

    -Arithmetic operators are used to perform mathematical operations between two operands, such as addition (+), subtraction (-), multiplication (*), division (/), etc.

  • What is an assignment operator and how is it used?

    -An assignment operator is used to assign a value to a variable. The most common assignment operator is the single equals sign (=), which assigns the value on its right to the variable on its left.

  • Can you give an example of a relational operator?

    -Relational operators are used to compare two values. An example of a relational operator is the less than operator (<), which checks if the value on its left is less than the value on its right.

  • What is a logical operator and what does it do?

    -A logical operator is used to combine multiple conditions or expressions and return a Boolean value (True or False). Examples include AND, OR, and NOT operators.

  • How do bitwise operators work?

    -Bitwise operators work on the binary representation of numbers. They perform operations bit by bit, such as AND, OR, XOR, and NOT, to manipulate individual bits in a binary number.

  • What is the purpose of a conditional operator?

    -A conditional operator is used to perform conditional assignments or expressions. It allows for a shorthand 'if-else' expression, often seen in the form of the ternary operator (?:) in some programming languages.

  • Can you describe the precedence of operators in an expression?

    -The precedence of operators determines the order in which operations in an expression are performed. Operators with higher precedence are evaluated first. For example, in most programming languages, multiplication and division have higher precedence than addition and subtraction.

Outlines

00:00

🔢 Introduction to Operators

The script begins with an introduction to the concept of operators, explaining what an operator is and the different types that are used in various operations. It mentions operand and operator, and how they are used in arithmetic, assignment, relational, logical, and bitwise operations within Python. The paragraph also touches on the importance of operators and their role in performing operations and computations.

05:01

📚 Exploring Arithmetic Operators

This paragraph delves into the specifics of arithmetic operators, illustrating how they are used to perform calculations between two numbers. Examples of addition, subtraction, multiplication, and division are given, with a demonstration of how these operations are carried out using variables and operators. The explanation includes the use of arithmetic operators in Python syntax and the outcomes of performing these operations.

10:01

🤖 Understanding Relational and Logical Operators

The script continues with an exploration of relational and logical operators, which are used to compare values and make decisions in programming. It explains the purpose of these operators and provides examples of how they function, such as checking if one value is greater than another or evaluating the truth of a statement. The paragraph also discusses the boolean nature of logical operators, which return either true or false based on the conditions evaluated.

15:02

🛠️ Bitwise Operators and Their Applications

The role of bitwise operators in programming is explained in this section, focusing on how they operate at the binary level to perform operations like AND, OR, and NOT. The script provides examples of bitwise operations and explains how they can be used to manipulate individual bits within numbers. It also discusses the practical applications of bitwise operators in certain programming scenarios.

20:02

🔄 The Order of Operations and Operator Precedence

This paragraph discusses the importance of the order in which operations are performed, known as operator precedence. It explains how certain operators have higher priority than others and how this affects the outcome of expressions. The script outlines the sequence in which different types of operators are applied, from parentheses to multiplication and division, and finally addition and subtraction, providing clarity on how calculations are executed in programming.

📌 Conclusion on the Role of Operators

The final paragraph summarizes the key points covered in the script, emphasizing the variety and importance of operators in programming. It reiterates the different categories of operators discussed, such as arithmetic, assignment, relational, logical, and bitwise, and their significance in executing commands and making computations. The script concludes by expressing gratitude for the audience's attention to the topic of operators.

Mindmap

Keywords

💡Operator

In the context of the video script, an 'operator' refers to a symbol or function that performs various operations on operands. It is central to the theme as it helps in understanding the mathematical and logical processes being discussed. For example, the script mentions different types of operators such as arithmetic, assignment, relational, logical, and bitwise, each serving a specific operation.

💡Operand

An 'operand' is a form of input to an operator. It is integral to the video's narrative as it represents the values or variables on which operations are performed. The script discusses how operands are used in conjunction with operators to form expressions and perform calculations.

💡Arithmetic Operators

Arithmetic operators are a subset of operators used to perform mathematical operations like addition, subtraction, multiplication, and division. They are key to the script's educational content, teaching viewers how to carry out basic arithmetic computations. The script provides examples such as using the plus sign (+) to indicate addition between two numbers.

💡Assignment Operator

The assignment operator is used to assign a value to a variable. It is crucial in programming as it allows for the setting of values, which is a fundamental concept in the script. The script illustrates this with the assignment of values to variables like 'a' and 'b' using the assignment operator '='.

💡Relational Operators

Relational operators are used to compare two operands and return a Boolean value based on the comparison. They are essential in the script for demonstrating conditional statements. The script mentions examples like 'x < y' which checks if 'x' is less than 'y', yielding a true or false outcome.

💡Logical Operators

Logical operators are used to combine multiple conditions or expressions and return a Boolean value. They are vital in the script for explaining complex decision-making processes. The script discusses operators like AND, OR, and NOT, which are used to combine conditions in programming logic.

💡Bitwise Operators

Bitwise operators work on the binary representation of numbers, performing operations bit by bit. They are highlighted in the script for their specific use in manipulating binary data. The script explains how operators like bitwise AND, OR, and NOT affect the binary representation of operands.

💡Precedence

Operator precedence dictates the order in which operators within an expression are evaluated. It is important in the script for understanding how complex expressions are simplified and calculated. The script mentions that understanding precedence helps in correctly interpreting the outcome of expressions involving multiple operators.

💡Boolean

The term 'Boolean' refers to a data type with two possible values: true or false. It is central to the script's discussion on logical operations and conditions. The script explains how Boolean values are used in relational and logical operators to represent truth values in program conditions.

💡Expression

An 'expression' is a combination of operands and operators that can be evaluated to produce a value. It is a key concept in the script, as it represents the fundamental building blocks of code that perform computations. The script provides examples of expressions involving various operators and operands.

💡Conditional Statements

Conditional statements are used to perform different actions based on certain conditions. They are crucial in the script for teaching viewers how to control the flow of a program. The script discusses how relational and logical operators are used within conditional statements to check for specific conditions.

Highlights

Introduction to the concept of operators and operands in the context of a lecture.

Explanation of various types of operators used in programming, including arithmetic, assignment, relational, logical, and bitwise.

The importance of operators in performing operations and their role in computation.

Illustration of how operators work with an example using the plus sign as an operator to indicate addition.

Discussion on arithmetic operators and their use in performing mathematical operations like addition, subtraction, multiplication, and division.

The use of assignment operators for assigning values to variables in programming.

Explanation of relational operators and their role in comparing values to produce boolean results.

Logical operators and their application in combining conditions in programming.

Bitwise operators and their function in manipulating binary representations of numbers.

The precedence of operators and how it affects the order of operations in expressions.

The concept of operand as a value or a variable that participates in operations.

Examples demonstrating the use of different operators in expressions and their outcomes.

The role of parentheses in changing the order of operations and enhancing readability.

Explanation of how to use operators in programming constructs like loops and conditionals.

The impact of operator usage on the efficiency and clarity of code.

A summary of the different types of operators and their significance in programming.

Practical applications of operators in coding examples and real-world scenarios.

Conclusion emphasizing the importance of understanding and correctly applying operators in programming.

Transcripts

play00:15

ఆపరేటర్లపై ఉపన్యాసానికి స్వాగతం! ఈ ఉపన్యాసంలో,

play00:18

ఆపరేటర్ అంటే ఏమిటో చూడబోతున్నాం. మరియు

play00:21

ఒక ఒపెరాండ్ అంటే ఏమిటి. మేము ఉపయోగించే

play00:24

వివిధ రకాల ఆపరేటర్లను కూడా పరిశీలిస్తాము.

play00:28

పైథాన్లో మరియు ఇవి అంకగణితం, అసైన్మెంట్,

play00:31

రిలేషనల్, లాజికల్ మరియు బిట్వైస్.

play00:33

మేము కూడా అలాగే ఉంటాము. ఆపరేటర్ల

play00:36

ప్రాధాన్యతను మరియు వాటిని వ్యక్తీకరణలో

play00:39

ఎలా ఉపయోగించాలో చూడటం.

play00:40

కాబట్టి, ఆపరేటర్లు మరియు ఆపెరెండ్లు

play00:43

ఏమిటో చూద్దాం . ఆపరేటర్ అనేది సహాయపడే ప్రత్యేక

play00:47

చిహ్నం. మీరు ఒక అసైన్మెంట్ ఆపరేషన్ నిర్వహిస్తున్నారు

play00:50

లేదా ఒక రకమైన గణన యొక్క స్వభావం గణన

play00:55

అనేది అంకగణితం లేదా తార్కికంగా ఉండవచ్చు.

play00:58

ఇప్పుడు, ఆపరేటర్ పనిచేసే విలువ దీనిని

play01:01

ఒపెరాండ్ అంటారు.

play01:02

కాబట్టి, ఆపరేటర్ మరియు ఆపరేటర్ ఏమిటో

play01:05

వివరించడానికి ఇక్కడ ఒక చిన్న ఉదాహరణ

play01:08

తీసుకుందాం. ఆపరేషన్ ఉంది. ఈ సందర్భంలో,

play01:11

మీరు ప్లస్ గుర్తులో చూసే ప్లస్ చిహ్నం

play01:15

ఒక ఆపరేటర్‌ . ఈ ఆపరేటర్ జోడింపును సూచిస్తుంది.

play01:19

కాబట్టి, మీరు ఆపరేటర్ ముందు మరియు తరువాత

play01:22

రెండు సంఖ్యలను చూస్తారు.

play01:24

కాబట్టి, ఈ సందర్భంలో 2 మరియు 3 లను ఒపెరాండ్స్

play01:29

అంటారు. కాబట్టి, అంకగణిత ఆపరేటర్లను

play01:32

చూద్దాం. ఇప్పుడు, ఏదైనా రెండు మధ్య

play01:35

గణిత కార్యకలాపాలను నిర్వహించడానికి

play01:37

అంకగణిత ఆపరేటర్లను ఉపయోగిస్తారు. కార్యాచరణలు.

play01:39

కాబట్టి, అంకగణితం యొక్క ఉపయోగాన్ని

play01:41

వివరించడానికి ఒక ఉదాహరణ తీసుకుందాం.

play01:44

ఆపరేటర్లు. 10 మరియు 5 విలువలతో a మరియు

play01:47

b అనే రెండు చరరాశులను సృష్టించండి. మునుపటి

play01:50

ఉపన్యాసాలలో మనం వేరియబుల్ను ఎలా

play01:53

సృష్టించాలో ఇప్పటికే చూశాము. కాబట్టి,

play01:55

మేము ఇక్కడ అదే విధానాన్ని ఉపయోగించబోతున్నాము.

play01:58

కాబట్టి, మనం చూడబోయే మొదటి ఆపరేటర్ అడిషన్

play02:02

ఆపరేటర్.

play02:03

ఇది ఒక ప్లస్ చిహ్నం ద్వారా సూచించబడుతుంది.

play02:06

మరియు ఈ విధంగా అదనంగా ఆపరేషన్ నిర్వహించబడుతుంది.

play02:09

నేను రెండు చరరాశులను జోడించాలనుకుంటే,

play02:11

అప్పుడు నేను చరరాశులను ప్లస్ చిహ్నంతో వేరు

play02:15

చేయబోతున్నాను, ఈ సందర్భంలో a అనేది

play02:18

10, b అనేది 5 కాబట్టి, మీకు లభించే మొత్తంలో

play02:22

ఫలితం 15 అవుతుంది. తదుపరి ఆపరేషన్ వ్యవకలనం

play02:25

సూచించబడుతుంది ఒక హైఫన్ ద్వారా.

play02:27

నాకు ఇక్కడ సంబంధిత ఉదాహరణ ఉంది.

play02:30

కాబట్టి, ఈ సందర్భంలో నేను a ని తీసివేయబోతున్నాను.

play02:35

మరియు b మరియు నేను ఇక్కడ పొందే అవుట్పుట్

play02:38

5. కాబట్టి, మన తదుపరి అంకగణిత ఆపరేషన్

play02:41

గుణకారం ఆపరేషన్ అని చూడబోతున్నారా,

play02:44

ఇది నక్షత్రం ద్వారా సూచించబడుతుంది

play02:46

మరియు మీరు రెండు చరరాశులను వేరుగా

play02:48

గుణించాలనుకుంటే చరరాశి మరియు నక్షత్ర

play02:50

చిహ్నాన్ని చొప్పించండి . ఈ ఉదాహరణలో మీకు

play02:53

లభించే గుణకారం 50; a అనేది 10, b అనేది మళ్లీ

play02:58

5. ఇప్పుడు, 10 గుణించి 5 అంటే 50 మరియు అది

play03:03

మీకు లభించే అవుట్పుట్.

play03:05

తదుపరి ఆపరేషన్ విభజన అంటే ఫార్వర్డ్ స్లాష్

play03:08

ద్వారా సూచించబడుతుంది. కాబట్టి, మీరు చరరాశులను

play03:10

వేరు చేసి, వాటి మధ్య ఫార్వర్డ్ స్లాష్ను

play03:13

చొప్పించండి. మీరు పొందేది ప్రాథమికంగా

play03:15

కోషెంట్. కాబట్టి, ఈ సందర్భంలో 10 బై

play03:19

5 మీకు కోషెంట్ ఇస్తుంది. 2 యొక్క అవుట్పుట్

play03:22

ఇక్కడ ఉంది.

play03:23

కాబట్టి, తదుపరి ఆపరేషన్ మిగిలినది

play03:25

పొందుతోంది మరియు అది. పర్సంటేజ్‌

play03:27

చిహ్నంతో సూచించబడుతుంది. కాబట్టి, ఇక్కడ అదే

play03:30

ఉదాహరణను తీసుకుందాం. నేను పొందడానికి

play03:32

ప్రయత్నిస్తున్నాను నేను a మరియు bని విభజించినప్పుడు

play03:35

మిగిలినవి మరియు మీరు చరరాశులను వేరు

play03:37

చేసి పర్సెంటేజ్‌ సింబల్‌ చొప్పించండి

play03:39

చిహ్నం మరియు అది మిగిలిన వాటిని తిరిగి

play03:43

ఇస్తుంది. ఈ సందర్భంలో a అనేది 10 మరియు b అనేది

play03:47

5.

play03:48

కాబట్టి, 10 అనేది 5 తో భాగించబడుతుంది

play03:51

మరియు అందువల్ల నేను 0 యొక్క మిగిలిన భాగాన్ని

play03:55

పొందుతాను. తదుపరి ఆపరేషన్ ఘాతాంకం

play03:57

మరియు ఇది సూచించబడుతుంది ఒక డబుల్ నక్షత్రం

play04:00

ద్వారా. కాబట్టి, నేను ఒక చరరాశిని

play04:03

మరొక చరరాశి యొక్క పవర్‌ కి ‌ పెంచాలనుకుంటున్నాను

play04:07

అని అనుకుందాం. అప్పుడు నేను ఈ ఆపరేషన్ను

play04:11

ఉపయోగించబోతున్నాను. కాబట్టి, ఈ సందర్భంలో

play04:13

నేను పవర్‌ కి పెంచాలనుకుంటున్నాను అని చెప్పండి.

play04:16

b, అప్పుడు నేను డబుల్ అస్టెరిక్స్‌ b అని

play04:20

చెబుతాను. కాబట్టి, ఈ సందర్భంలో మనకు

play04:23

a అనేది 10 మరియు b అనేది 5 గా ఉన్నందున, నేను

play04:29

కేవలం 10 ని 5 యొక్క శక్తికి పెంచబోతున్నాము

play04:34

మరియు మీకు ఇక్కడ లభించే సంబంధిత అవుట్పుట్

play04:38

1 లక్ష. కాబట్టి, ఆపరేటర్ల సోపానక్రమాన్ని

play04:41

చూద్దాం. ఇప్పుడు, నేను ఆర్డర్ చేశాను

play04:44

ప్రాధాన్యత తగ్గుతున్న క్రమంలో ఆపరేటర్లు.

play04:47

కాబట్టి, మొదటిది కుండలీకరణాలు.

play04:49

కాబట్టి, కుండలీకరణాలు నిజంగా ఆపరేటర్ కాదు,

play04:52

కానీ కుండలీకరణాల లోపల ఉన్న ఏదైనా.

play04:55

అత్యధిక ప్రాధాన్యతను పొందుతుంది. కాబట్టి,

play04:58

నేను ఒక ఆపరేషన్గా కుండలీకరణాన్ని

play05:00

కూడా చేర్చాను. ఇప్పుడు, దీని తరువాత ఘాతాంక

play05:04

కార్యకలాపాలు మరియు తరువాత విభజన, గుణకారం

play05:07

మరియు అదనంగా ఉంటాయి. మరియు వ్యవకలనం అదే

play05:11

ప్రెసిడెన్స్‌ ఇవ్వబడింది; కాబట్టి, ఈ సందర్భంలో

play05:15

ఇక్కడ ఒక ఉదాహరణ తీసుకుందాం.

play05:17

నాకు ఈ క్రింది వ్యక్తీకరణ ఉంది. నాకు A అనేది

play05:22

7 మైనస్ 2 అంగుళాల నుండి 27 బై 3 స్క్వేర్

play05:27

ప్లస్ 4 కి సమానం. కాబట్టి, గందరగోళాన్ని

play05:30

నివారించడానికి నేను ఈ 27 బై 3 చదరపు

play05:34

పదం కోసం బ్రాకెట్ను జోడించబోతున్నాను.

play05:36

కాబట్టి, 27 అనేది న్యూమరేటర్, డినామినేటర్

play05:39

3 చదరపు మరియు 3 చతురస్రాన్ని సూచించడానికి నేను

play05:43

ఇక్కడ డబుల్ నక్షత్రాన్ని జోడిస్తాను మరియు

play05:45

మొత్తం పదం నేను దానిని పేరెంథీసెస్‌

play05:48

లోపల పొందుపరుస్తున్నాను; కాబట్టి, మీరు మీ

play05:51

కన్సోల్ లో ఆదేశాన్ని అమలు చేసిన తర్వాత,

play05:54

మీరు A విలువను ప్రింట్ చేస్తే, అది 5 ని తిరిగి

play05:59

ఇవ్వాలి; కాబట్టి, మీరు ఆపరేటర్లను

play06:01

ఈ విధంగా ఉపయోగిస్తారు వ్యక్తీకరణ. మీరు

play06:04

ఈ ఉదాహరణను కూడా ప్రయత్నించవచ్చు.

play06:06

కాబట్టి, ఇప్పుడు అసైన్మెంట్ ఆపరేటర్లను

play06:08

చూద్దాం. కాబట్టి, ఒక అసైన్మెంట్ ఆపరేటర్

play06:11

ఒక చరరాశికి విలువను కేటాయించడానికి

play06:13

ఉపయోగించబడుతుంది. కాబట్టి, మొదటి అసైన్మెంట్

play06:15

ఆపరేటర్ మనం పరిశీలించబోయేది చిహ్నానికి సమానం.

play06:18

ఇప్పుడు, ఇది అత్యంత సాధారణంగా భారీ అసైన్మెంట్

play06:21

ఆపరేషన్ మరియు అది ఎందుకంటే మీరు మీకు

play06:24

కావలసిన వేరియబుల్ను సృష్టించాలనుకున్నప్పుడల్లా

play06:26

దానికి ఒక విలువను కేటాయించండి. కాబట్టి,

play06:28

మన మునుపటి ఉపన్యాసాలలో ఈ ఆపరేటర్ను ఎలా

play06:32

ఉపయోగించాలో నేర్చుకున్నాము.

play06:33

కాబట్టి, ఇది ప్రాథమికంగా చేసేది ఏమిటంటే,

play06:35

ఇది కుడి వైపు నుండి ఆపరేషన్కు విలువలను

play06:39

కేటాయిస్తుంది. ఎడమ వైపు ఆపరేషన్. ఇప్పుడు,

play06:41

ఎడమ వైపు ఒపెరాండ్ అనేది వేరియబుల్

play06:44

పేరు మరియు కుడి వైపు ఒపెరాండ్ అనేది

play06:47

చరరాశికి ఇవ్వబడిన విలువ. కాబట్టి, ఈ

play06:50

సందర్భంలో ఒక ఉదాహరణ తీసుకుందాం. నేను

play06:53

నిలుపుకుంటున్నాను అదే చరరాశి పేర్లు

play06:55

a మరియు b, నేను a కి 10 విలువను కేటాయిస్తున్నాను.

play06:59

ఈ సందర్భంలో 10 నా కుడి వైపు. ఒపెరాండ్

play07:03

మరియు a నా ఎడమ వైపు ఒపెరాండ్. కాబట్టి,

play07:07

అదే నిర్వచనం b కి 5 కి సమానంగా ఉంటుంది.

play07:11

కాబట్టి, మనం పరిశీలించబోయే తదుపరి ఆపరేటర్ అనేది

play07:15

ఆపరేటర్కు ప్లస్ ఈక్వల్టు . ఇది ప్రాథమికంగా

play07:18

చేసేది ఏమిటంటే, ఇది మొదట ఎడమ ఒపెరాండ్కు

play07:22

కుడి ఒపెరాండ్ను జోడిస్తుంది, ఆపై

play07:24

ఇది ఫలితాన్ని ఎడమ వైపున నిల్వ చేస్తుంది

play07:28

ఆపరాండ్‌ ఇప్పుడు, అదే చరరాశులు a మరియు

play07:33

b ని తీసుకుందాం.

play07:35

నేను b కి సమానమైన a ని సూచిస్తే, ఇది

play07:40

a కి సమానమైన a కి అనువదిస్తుంది బి. నేను దానిని ఇక్కడ

play07:45

కుండలీకరణాలలో సూచించాను. కాబట్టి, నేను b కి

play07:49

సమానమైన ప్లస్ ఇచ్చినప్పుడల్లా, అప్పుడు నేను a అనేది

play07:55

a ప్లస్ b కి సమానం అని చెప్తున్నాను,

play07:59

కాబట్టి, జరిగే మొదటి ఆపరేషన్ అదనంగా ఉంటుంది.

play08:02

ఆపరేషన్ అనేది a ప్లస్ b. కాబట్టి, a ప్లస్

play08:06

b విలువ a లో నిల్వ చేయబడుతుంది, అందువల్ల

play08:08

మీరు చేయవచ్చు.

play08:09

a యొక్క విలువ 15 a కి నవీకరించబడుతుందని,

play08:11

అంతకుముందు 10 గా ఉందని, ఇప్పుడు విలువ 15 కి

play08:15

నవీకరించబడుతుందని చూడండి. తదుపరి ఆపరేటర్

play08:17

మైనస్ఈక్వల్టు ఆపరేటర్, కాబట్టి, ఇది కూడా

play08:19

అడిషన్ ఆపరేటర్ మాదిరిగానే ఉంటుంది. ఇది మనం

play08:22

ఇంతకు ముందు చూశాం. ఇది ప్రాథమికంగా

play08:24

ఎడమ నుండి కుడి ఒపెరాండ్ను తీసివేస్తుంది మరియు

play08:27

ఇది నిల్వ చేస్తుంది ఫలితంగా ఎడమ వైపు

play08:29

ఒపెరాండ్. ఇప్పుడు, నేను b కి సమానమైన

play08:31

మైనస్ ఇచ్చినప్పుడల్లా అది a అని అనువదిస్తుంది

play08:32

a మైనస్ b కి సమానం.

play08:36

ఇప్పుడు, నేను లెక్కించినప్పుడల్లా ఈ సందర్భంలో వ్యత్యాసం

play08:39

నాకు అందుతోంది 5 యొక్క వ్యత్యాసం

play08:42

మరియు నేను దానిని ముద్రిస్తున్నాను.

play08:44

కాబట్టి, ఆస్టెరిక్ ఆపరేటర్ కుడి వైపుకు

play08:46

గుణిస్తారు ఎడమవైపు నుండి ఆపెరాండ్ చేయండి

play08:49

మరియు ఫలితాన్ని ఎడమ ఆపెరాండ్లో నిల్వ

play08:52

చేస్తుంది. ఇప్పుడు, ఈ సందర్భంలో మళ్ళీ

play08:54

నేను a మరియు b యొక్క అదే విలువలను నిలుపుకోబోతున్నాను;

play08:59

a అంటే 10, b అంటే 5 అంటే నేను గుణిస్తున్నాను.

play09:05

a మరియు b మొదటివి. కాబట్టి, ఒక నక్షత్రం

play09:09

b నాకు 50 యొక్క ఉత్పత్తిని ఇస్తుంది.

play09:11

ఇప్పుడు, నేను విలువను ముద్రించినప్పుడల్లా

play09:13

దాని యొక్క నవీకరించబడిన విలువ నాకు 50 అవుతుంది.

play09:16

ఫార్వర్డ్ స్లాష్ అంటే విభజన. కాబట్టి,

play09:19

నేను ఈ ఆపరేటర్ను ఉపయోగించినప్పుడల్లా,

play09:20

నేను కుడి ఒపెరాండ్ను ఎడమ నుండి విభజించడానికి

play09:23

వెళుతున్నాను మరియు విలువను ఎడమ ఒపెరాండ్లో

play09:26

నిల్వ చేయండి. ఇప్పుడు, ఈ సందర్భంలో ఫార్వర్డ్

play09:28

స్లాష్ సమానంగా ఉంటుంది a = a ఫార్వర్డ్ స్లాష్

play09:32

b కు సమానం అని అనువదిస్తుంది; ఇప్పుడు, మీరు a యొక్క

play09:35

విలువను ముద్రిస్తే మీరు దానిని చూడవచ్చు

play09:38

రెండింటి విలువ 2 నుండి 10కి నవీకరించబడింది.

play09:40

కాబట్టి, ఇప్పుడు సంబంధం లేదా పోలిక

play09:43

ఏమిటో చూద్దాం.

play09:44

ఆపరేటర్లు ఉన్నారు. రిలేషనల్ ఆపరేటర్

play09:45

సంఖ్యా సమానత్వం లేదా మధ్య అసమానత

play09:48

కోసం పరీక్షిస్తారు. రెండు ఆపరేషన్లు.

play09:50

రిలేషనల్ ఆపరేటర్ తిరిగి ఇచ్చే విలువ

play09:52

బూలియన్ స్వభావం కలిగి ఉంటుంది అంటే

play09:54

ఇది ప్రాథమికంగా నిజమైన లేదా ఫాల్స్‌.

play09:56

తిరిగి వస్తుంది; ఇప్పుడు, మనం ఉన్న

play09:59

అన్ని రిలేషనల్ ఆపరేటర్లు పరిశీలించడానికి

play10:01

వెళుతున్నప్పుడు ఒకే ప్రాధాన్యత ఉంటుంది,

play10:02

అంటే వారందరికీ ఒకే ప్రాధాన్యత ఉంటుంది.

play10:05

కాబట్టి, x మరియు y అనే రెండు చరరాశులను

play10:06

సృష్టించుకుందాం.

play10:07

నేను 5 నుండి x మరియు 7 నుండి y విలువను

play10:09

కేటాయిస్తున్నాను. మొదటిది రిలేషనల్

play10:11

ఆపరేషన్ అనేది ఆపరేషన్ కంటే ఖచ్చితంగా తక్కువ.

play10:13

ఇది యాంగిల్ ఆపరేటర్ ద్వారా సూచించబడుతుంది

play10:15

ఎడమ వైపున దాని కొనతో. కాబట్టి, ఒక ఉదాహరణ

play10:18

తీసుకుందాం మరియు ఈ ఆపరేటర్ ఎలా పనిచేస్తుందో

play10:21

చూద్దాం. ఇప్పుడు మనకు ఇప్పటికే x మరియు

play10:24

y విలువలు ఉన్నాయి.

play10:25

ఇప్పుడు, నేను x అనేది y కంటే తక్కువ అనే

play10:27

సంబంధాన్ని ఇస్తున్నాను. కాబట్టి, ఇప్పుడు,

play10:28

ఏమి జరుగుతుంది అంటే x ఖచ్చితంగా y కంటే

play10:31

తక్కువగా ఉందో లేదో తనిఖీ చేస్తుంది?

play10:34

మా విషయంలో, అవును, x అనేది 5, y అనేది 7.

play10:37

కాబట్టి, అవును, 5 ఖచ్చితంగా 7 కంటే

play10:40

తక్కువ మరియు అందువల్ల మీరు చూసే అవుట్పుట్

play10:42

నిజం. తదుపరి ఆపరేషన్ అనేది < = ఆపరేషన్

play10:44

, ఇది మళ్ళీ < =తో సూచించబడుతుంది. దానితో కోణ ఆపరేటర్

play10:46

ఎడమ వైపుకు కొనగా ఉంటుంది, తరువాత

play10:48

చిహ్నానికి సమానంగా ఉంటుంది.

play10:49

ఇప్పుడు, ఒక ఉదాహరణ తీసుకుందాం. ఇప్పుడు,

play10:51

ఈ సందర్భంలో నేను సమానం కంటే తక్కువ

play10:53

x కోసం అవుట్పుట్ను ముద్రించడానికి

play10:56

ప్రయత్నిస్తున్నాను. Y కి. కాబట్టి, ఈ సందర్భంలో

play10:59

మనం x అనేది y కంటే తక్కువగా ఉందా లేదా

play11:01

x అనేది కనీసం yకి సమానంగా ఉందా అని

play11:05

తనిఖీ చేస్తున్నాము. ఇవి మనం తనిఖీ చేయబోయే

play11:08

రెండు షరతులు. కాబట్టి, x అనేది వాస్తవానికి,

play11:10

y కి సమానం కాదు, కానీ x y కంటే తక్కువగా

play11:15

ఉంటుంది.

play11:16

కాబట్టి, ఆ షరతు సంతృప్తి చెందింది మరియు అందువల్ల

play11:19

మీకు లభించే అవుట్పుట్ నిజం. కాబట్టి, ఆపరేటర్

play11:22

కంటే ఖచ్చితంగా తక్కువ మరియు సమానం కంటే

play11:26

తక్కువ మాదిరిగానే, మీకు ఉంది ఆపరేటర్

play11:29

కంటే ఖచ్చితంగా ఎక్కువ మరియు సమానం కంటే

play11:32

ఎక్కువ. కాబట్టి, దీనికి విరుద్ధంగా

play11:34

ఖచ్చితంగా తక్కువ. ఆపరేటర్ కంటే, ఈ సందర్భంలో

play11:37

మీరు x అనేది y కంటే పెద్దదా అని ఖచ్చితంగా

play11:41

తనిఖీ చేస్తున్నారు. వాస్తవానికి, అది

play11:43

కాదు మరియు అందువల్ల అవుట్పుట్ తప్పు.

play11:45

మీకు సమానం కంటే ఎక్కువ ప్రాథమికంగా

play11:47

తనిఖీ చేస్తున్నారు x అనేది y కంటే పెద్దదా

play11:50

లేదా x అనేది yకి సమానమా. కాబట్టి, రెండు షరతులు

play11:54

ఏమైనప్పటికీ తప్పు. అందువల్ల మీరు పొందే

play11:57

అవుట్పుట్ కూడా ఫాల్స్‌ ; కాబట్టి, ఆపరేటర్

play11:59

కంటే ఖచ్చితంగా ఎక్కువ అని సూచిస్తారు.

play12:02

కుడివైపు దాని కొనతో మరియు ఆపరేటర్కు

play12:05

సమానం కంటే పెద్ద కోణంతో ఉన్న ఆపరేటర్

play12:08

ద్వారా కుడివైపు దాని కొనతో కోణ ఆపరేటర్

play12:11

ద్వారా సూచించబడుతుంది, తరువాత సమానమైన చిహ్నం

play12:14

ఉంటుంది.

play12:15

తదుపరి ఆపరేషన్ అనేది ఆపరేషన్కు సమానం.

play12:17

ఇది డబుల్ ఈక్వల్ ద్వారా సూచించబడుతుంది

play12:20

చిహ్నానికి మరియు మనం రెట్టింపు సమానంగా

play12:23

ఇచ్చినప్పుడు మనం నిజంగా ఏమి తనిఖీ

play12:26

చేస్తాము? ఎడమ చేతి వైపు ఉందా అని మేము

play12:29

తనిఖీ చేస్తాము ఒపెరాండ్ అంటే ఇది కుడి చేతి

play12:33

వైపు ఒపెరాండ్కు సరిగ్గా సమానం. ఈ

play12:36

సందర్భంలో విలువ x మరియు y లు వరుసగా

play12:39

5 మరియు 7 మరియు నేను 5 సరిగ్గా 7 కి సమానంగా

play12:44

ఉందా లేదా అని తనిఖీ చేస్తున్నాను. లేదు,

play12:47

అది కాదు మరియు అందువల్ల అవుట్పుట్ తప్పు.

play12:50

తదుపరి ఆపరేషన్ దీనికి సమానం కాదు. ఇది సూచించబడుతుంది

play12:54

ఆశ్చర్యార్థకం తరువాత సింబల్‌ కు సమానం;

play12:57

కాబట్టి, ఈ సందర్భంలో అవుట్పుట్ నిజమవుతుంది

play12:59

x అనేది yకి సమానం కానంత వరకు.

play13:03

కాబట్టి, మీరు పునరావృతం చేస్తున్నప్పుడు

play13:05

ఈ ఆపరేటర్ తరచుగా ఉపయోగించబడుతుంది.

play13:08

ఒక లూప్ మరియు మీరు లూప్ని అమలు చేయాలనుకుంటున్నారు

play13:13

లేదా మీరు ఒక నిర్దిష్ట లూప్ ఉన్నంత వరకు

play13:18

లూప్ ద్వారా పునరావృతం చేయాలనుకుంటున్నారు

play13:20

షరతు కట్టుబడి ఉంది. కాబట్టి, మీరు ఆ సందర్భంలో

play13:25

'నాట్ ఈక్వల్ టు' ను ఉపయోగించవచ్చు. ఇప్పుడు,

play13:29

x అనేది y కి సమానం కానంత వరకు నా అవుట్పుట్

play13:33

ఎల్లప్పుడూ నిజంగానే ఉంటుంది.

play13:35

కాబట్టి, తదుపరి ఆపరేటర్లు తార్కికమైనవి.

play13:37

ఆపరేటర్లు. ఆపెరెండ్లు షరతులతో కూడిన ప్రకటనలు

play13:39

అయినప్పుడు లాజికల్ ఆపరేటర్ ఉపయోగించబడుతుంది.

play13:41

అవుట్పుట్ లాజికల్ ఆపరేటర్లు బూలియన్

play13:43

స్వభావం కలిగి ఉంటారు, అంటే అవి నిజమైనవి

play13:46

లేదా అబద్ధమైనవి అని అర్థం. కాబట్టి,

play13:48

ఖచ్చితంగా పైథాన్ కోణం నుండి లాజికల్

play13:51

ఆపరేటర్లు మాత్రమే పనిచేయడానికి రూపొందించబడ్డాయి

play13:53

స్కేలర్లు మరియు బూలియన్ విలువలతో.

play13:55

కాబట్టి, మీరు రెండు శ్రేణులను పోల్చాలనుకుంటే,

play13:57

లాజికల్ ఆపరేటర్.

play13:58

ఉపయోగించలేరు. కాబట్టి, మొదటి తార్కిక చర్యను

play14:00

తీసుకుందాం, ఇది తార్కికమైనది లేదా

play14:02

దీని ద్వారా సూచించబడుతుంది. అక్షరాలు లేదా, రెండు

play14:05

అక్షరాలు చిన్న అక్షరాలలో ఉంటాయి. ఇప్పుడు,

play14:08

ఇక్కడ ఒక చిన్న ఉదాహరణ తీసుకుందాం, నేను

play14:11

x మరియు y కోసం అదే విలువలను నిలుపుకుంటున్నాను;

play14:16

x అంటే 5, y అంటే 7. ఇప్పుడు, నేను x ఇస్తే y కంటే

play14:21

ఎక్కువ మరియు దానిని కుండలీకరణంలో ఉంచండి,

play14:24

తరువాత లేదా ఆపై x లేని మరొక షరతు కోసం

play14:27

తనిఖీ చేయండి y కంటే, నాకు నిజమని చెప్పే

play14:30

అవుట్పుట్ వస్తుంది. ఇప్పుడు, ఇది ఎందుకు

play14:32

జరుగుతుంది? కాబట్టి, ఒక తార్కిక OR కోసం

play14:34

రూపొందించబడింది.

play14:35

ఒక ప్రకటన సంతృప్తి చెందినప్పుడు అవుట్పుట్

play14:36

నిజమని ఇవ్వండి. ఈ సందర్భంలో x అనేది

play14:37

y కంటే పెద్దది, ఇది సంతృప్తి చెందలేదు.

play14:40

కాబట్టి, ఇది తప్పు, అయితే, ఆ ప్రకటన సంతృప్తి

play14:44

చెందింది. కాబట్టి, ఇది ఇది మీకు నిజమైన

play14:47

అవుట్పుట్ ఇస్తుంది. కాబట్టి, ఆపరేటర్కు

play14:49

ఇన్పుట్లు ప్రాథమికంగా తప్పు మరియు ట్రూ

play14:52

.

play14:53

కాబట్టి, మీకు తప్పుడు మరియు నిజమైన ఆపరేషన్

play14:56

ఉన్నప్పుడల్లా, ఫలితం ఎల్లప్పుడూ నిజం

play14:58

అవుతుంది. కాబట్టి, అందువల్ల మీరు నిజమైన

play15:01

అవుట్పుట్ను కూడా పొందుతున్నారు. తదుపరిది

play15:03

లాజికల్ AND, ఇది ప్రాతినిధ్యం వహిస్తుంది అక్షరాల

play15:07

ద్వారా మరియు, అన్ని అక్షరాలు మళ్లీ చిన్న

play15:10

అక్షరాలలో ఉంటాయి. ఇక్కడ ఒక చిన్న ఉదాహరణ

play15:14

తీసుకుందాం, నేను పైన పరిగణించిన అదే

play15:17

వ్యక్తీకరణలను తీసుకుంటున్నాను. ఇప్పుడు, ఈ సందర్భంలో

play15:20

లేదా నేను వాటిని మరియు ద్వారా భర్తీ

play15:23

చేస్తున్నాను.

play15:24

కాబట్టి, అదే పరిస్థితుల కోసం నేను వేరే అవుట్పుట్ను

play15:28

పొందుతున్నాను. ఈ కేసు అబద్ధం. కాబట్టి,

play15:31

ఇది ఎందుకు జరుగుతుంది? మీరు షరతులతో కూడిన

play15:34

ప్రకటనలను పరిశీలిస్తే మొదటిది y కంటే x ఎక్కువ,

play15:37

ఇది మీకు బూలియన్ విలువను ఇచ్చే తప్పుడు

play15:38

ప్రకటన అని మాకు తెలుసు అబద్ధం. రెండవ

play15:39

షరతులతో కూడిన ప్రకటన y కంటే x తక్కువ.

play15:40

ఇప్పుడు, నేను ఇంతకు ముందు చెప్పినట్లుగా

play15:42

ఇది నిజం. కాబట్టి, లాజికల్ AND పనిచేసే

play15:44

విధానం ఏమిటంటే, మీకు తప్పుడు మరియు

play15:46

నిజమైన పరిస్థితి ఉన్నప్పుడల్లా మీరు

play15:48

ప్రాథమికంగా తప్పుడు అవుట్పుట్ను పొందుతారు

play15:50

మరియు దీనికి కారణం లాజికల్ మరియు మీరు

play15:52

ఆశించేది. రెండు షరతులను సంతృప్తి

play15:54

పరచండి మరియు ఈ విలువలు రెండూ నిజమైతే తప్ప

play15:57

అది ఎప్పటికీ తిరిగి రాదు అవుట్పుట్ నిజమైనది.

play15:59

కాబట్టి, మీకు తప్పుడు నిజం లేదా నిజం తప్పు

play16:02

ఉన్నప్పటికీ అవుట్పుట్ ఎల్లప్పుడూ తప్పుగా

play16:04

ఉంటుంది. కాబట్టి, తదుపరి లాజికల్ ఆపరేటర్

play16:06

అక్షరం ద్వారా సూచించబడదు, మళ్ళీ చిన్న అక్షరంలో.

play16:09

కాబట్టి, ప్రాథమికంగా మీ ప్రకటనను తిరస్కరించదు.

play16:11

కాబట్టి, నేను x యొక్క ఉదాహరణను y కి సమానంగా

play16:13

తీసుకున్నాను. x యొక్క విలువ 5 అని, y యొక్క

play16:14

విలువ 7 అని మనకు తెలుసు, వాస్తవానికి, రెండూ

play16:16

సమానం కాదు. ఇప్పుడు, ఈ షరతులతో కూడిన

play16:19

ప్రకటన నుండి మీకు లభించే అవుట్పుట్

play16:20

తప్పు. కాబట్టి, మేము అబద్ధాన్ని తిరస్కరించడానికి

play16:22

ప్రయత్నించడం అంటే ఫాల్స్‌.

play16:23

కాదు; కాబట్టి, అది మీకు నిజమైన ఫలితాన్ని

play16:26

ఇస్తుంది. కాబట్టి, అందుకే మీరు అవుట్పుట్ను

play16:27

నిజమైనదిగా పొందుతారు. ఇప్పుడు, గమనించవలసిన

play16:29

మరో ముఖ్యమైన అంశం లాజికల్ ఆపరేటర్లు

play16:31

అంటే, మీరు ఈ షరతులతో కూడిన లేదా రిలేషనల్

play16:33

స్టేట్మెంట్లను ఇచ్చినప్పుడల్లా,

play16:34

మీరు వెళ్ళడం లేదు కాబట్టి మీరు వాటిని

play16:36

కుండలీకరణాలలో బంధించేలా చూసుకోండి అలా చేస్తే

play16:38

మీకు పొరపాటు వచ్చే అవకాశం ఉంది. కాబట్టి,

play16:40

బిట్వైస్ ఆపరేటర్లకు వెళ్దాం. కాబట్టి,

play16:42

ఒపెరాండ్లు పూర్ణాంకాలు అయినప్పుడు బిట్వైస్

play16:43

ఆపరేటర్లు ఉపయోగించబడతాయి. కాబట్టి, ఈ పూర్ణాంకాలు

play16:45

బైనరీ అంకెల స్ట్రింగ్గా పరిగణించబడతాయి

play16:47

మరియు బైనరీ ఎన్కోడ్ చేయబడతాయి.

play16:48

కాబట్టి, మీరు ఉన్నప్పుడు బైనరీ కోడ్ చేయబడిన

play16:50

రెండు పూర్ణాంకాలపై బిట్వైస్ ఆపరేటర్ను

play16:52

ఉపయోగించబోతున్నప్పుడు, ఆపరేటర్ వెళుతున్నాడు

play16:53

బైనరీ కోడ్ను బిట్ బై బిట్ పోల్చడానికి

play16:55

మరియు ఆపరేటర్ దాని పేరును బిట్వైస్గా

play16:57

ఎలా పొందాడు. బిట్వైస్ ఆపరేటర్ను ఉపయోగించడం

play16:59

వల్ల కలిగే మరొక ప్రయోజనం ఏమిటంటే,

play17:01

వారు షరతులతో కూడిన స్టేట్మెంట్స్‌.

play17:02

పై పనిచేయగలరు. ఇప్పుడు, ఈ షరతులతో కూడిన

play17:04

ప్రకటనలు స్కేలార్ విలువలను పోల్చవచ్చు

play17:06

లేదా అవి అరేస్‌.

play17:07

ను కూడా పోల్చవచ్చు. ఇప్పుడు, మీరు శ్రేణులను

play17:09

పోల్చాలనుకుంటే మీరు బిట్వైస్ ఆపరేటర్ను

play17:11

ఉపయోగిస్తున్నారు. మేము ఇంతకు ముందు

play17:12

చూశాము శ్రేణులను నిర్వహించడానికి

play17:13

మనం లాజికల్ ఆపరేటర్లను ఉపయోగించలేము మరియు

play17:15

ఇక్కడే బిట్వైస్ ఆపరేటర్లు అడుగు

play17:17

పెడతారు. కాబట్టి, కోర్సు అంతటా మనం

play17:18

రెండు బిట్వైస్ ఆపరేటర్లను చూడబోతున్నాం. మొదటిది

play17:20

బిట్వైస్ OR అని చెబుతుంది, ఇది పైపు ద్వారా

play17:23

సూచించబడుతుంది మరియు రెండవ ఆపరేటర్

play17:25

బిట్వైస్గా మరియు ఆంపర్సాండ్ ద్వారా

play17:27

సూచించబడుతుంది.

play17:28

కాబట్టి, విలువలతో x మరియు y అనే రెండు

play17:29

చరరాశులను సృష్టించండి. 5 మరియు 7. ఇప్పుడు,

play17:31

ఇవి 5 మరియు 7 కోసం బైనరీ సంకేతాలు మరియు

play17:33

మేము ఈ చరరాశులను ఉపయోగించబోతున్నాము

play17:34

మా ఉదాహరణ. కాబట్టి, 0 అనేది తప్పుకు అనుగుణంగా

play17:36

ఉంటుంది మరియు 1 అనేది నిజానికి అనుగుణంగా

play17:38

ఉంటుంది. మరియు, కొంచెం తెలివిగా లేదా ఆపరేటర్

play17:39

ఫలితాన్ని బిట్ బై బిట్ కాపీ చేస్తాడు,

play17:41

అది ఏదైనా ఒపెరాండ్లో ఉంటే. కానీ, బిట్వైస్

play17:43

లో మరియు ఆపరేటర్ బిట్ను రెండు ఒపెరాండ్లలో

play17:45

ఉన్నట్లయితే మాత్రమే కాపీ చేస్తాడు.

play17:46

కాబట్టి, ఒక ఉదాహరణ తీసుకుందాం మరియు

play17:47

ఈ రెండు ప్రకటనల అర్థం ఏమిటో చూద్దాం.

play17:49

ఇప్పుడు, నేను బిట్వైస్గా లేదా పూర్ణాంకాలపై

play17:50

వివరించబోతున్నాను. ఇప్పుడు, నేను బిట్వైస్

play17:51

OR ఆపరేటర్ను ఉపయోగిస్తున్నాను, ఇది x మరియు y మధ్య

play17:53

పైప్ చిహ్నం; x మరియు y నావి కార్యాచరణలు.

play17:56

మీరు పొందబోయే అవుట్పుట్ 7 అవుతుంది. కాబట్టి,

play17:59

ఈ అవుట్పుట్ ఎలా సాధించబడిందో చూద్దాం.

play18:02

కాబట్టి, నేను ఇక్కడ రెండు శ్రేణులను

play18:04

సృష్టించాను. ఈ శ్రేణులలోని కణాలు వ్యక్తిగత

play18:06

బైనరీని కలిగి ఉంటాయి 5 మరియు 7 కోసం కోడ్,

play18:10

మరియు నేను వాటిని సూచన కోసం రంగు కోడ్

play18:14

చేసాను. కాబట్టి, రెండింటి యొక్క మొదటి

play18:16

రెండు స్థానాలు బైనరీ సంకేతాలు 0. కాబట్టి,

play18:19

ఈ రెండూ నా ఇన్పుట్ ఒపెరాండ్స్గా పనిచేస్తాయి.

play18:22

ఇప్పుడు, ఈ రెండు స్థానాలకు ఉన్నాయి.

play18:24

0 మరియు అందువల్ల ఫలితము కూడా 0 ని కలిగి

play18:28

ఉంటుంది. ఇప్పుడు, రెండవ స్థానాన్ని

play18:30

తీసుకుందాం. రెండవ స్థానం కూడా బైనరీ

play18:32

సంకేతాలు రెండింటికీ 0 కలిగి ఉంది మరియు

play18:35

అందువల్ల నా సంబంధిత స్థానం ఫలితంగా వచ్చే

play18:38

బైనరీ కోడ్ కూడా 0 అవుతుంది. నేను వృత్తాలను

play18:41

ఉపయోగించి స్థానాలను హైలైట్ చేసాను నేను

play18:44

ఏ కణాలను సూచిస్తున్నానో మీకు చూపించండి.

play18:46

కాబట్టి, ఇప్పుడు మీరు 3 స్థానాలను

play18:48

కూడా చూడవచ్చు.

play18:49

4 మరియు 5 రెండింటికీ బైనరీ సంకేతాలు 0

play18:53

లను కలిగి ఉంటాయి. కాబట్టి, అందువల్ల

play18:55

సంబంధిత స్థానాలు ఫలితంగా వచ్చే బైనరీ

play18:58

కోడ్లో 0. కూడా ఉంటుంది; గమనించదగ్గ మరో ముఖ్యమైన

play19:01

విషయం ఏమిటంటే ఆరవది రెండు బైనరీ సంకేతాలు

play19:04

యొక్క స్థానం 1 కలిగి ఉంటుంది. కాబట్టి,

play19:07

5 కోసం బైనరీ కోడ్ మరియు బైనరీ కోడ్

play19:10

7 కోసం, ఈ రెండు సంకేతాలలో ఆరవ స్థానం 1 కి అనుగుణంగా

play19:15

ఉంటుంది మరియు అందువల్ల ఫలిత బైనరీలో కోడ్

play19:18

నేను ఆరవ స్థానం కోసం 1ని కాపీ చేస్తున్నాను.

play19:21

మరింత ముందుకు వెళ్తే, మీరు 7వ స్థానాన్ని

play19:24

పోల్చి చూస్తే ఈ రెండు బైనరీ కోడ్లకు

play19:27

బైనరీ కోడ్ 5కి 7వ స్థానం 0 కలిగి ఉందని

play19:31

మీరు చూడవచ్చు.

play19:32

మరియు బైనరీ కోడ్ 7కి, 7వ స్థానం 1 కలిగి

play19:35

ఉంటుంది. కాబట్టి, ఈ సందర్భంలో ఒక వ్యత్యాసం

play19:38

ఉంది ఈ రెండు ఆపరేషన్ల మధ్య విలువలు. కాబట్టి,

play19:42

సంబంధిత మొత్తాన్ని ఎలా పూరించాలో చూడబోతున్నాం.

play19:44

ఫలిత బైనరీ కోడ్ యొక్క స్థానం. కాబట్టి,

play19:47

మేము ఒక OR ఆపరేటర్ను ఉపయోగిస్తున్నందున,

play19:48

ఒక షరతు నిజమైనప్పుడు, ఫలితం ఎల్లప్పుడూ

play19:49

నిజమవుతుంది. ఈ సందర్భంలో, మీరు గుర్తుకు తెచ్చుకోగలిగితే,

play19:50

నేను ఇంతకు ముందు చెప్పినట్లుగా 0

play19:51

అబద్ధానికి అనుగుణంగా ఉంటుంది మరియు 1 నిజానికి

play19:52

అనుగుణంగా ఉంటుంది, మనకు ఒక నిజమైన షరతు

play19:53

ఉంది.

play19:54

కాబట్టి, ఫలితము 1 అయిన నిజమైన విలువను

play19:55

కూడా కలిగి ఉంటుంది. కాబట్టి, ఒక OR ఆపరేటర్

play19:56

మీకు అవుట్పుట్ను నిజమైనదిగా ఇస్తుంది,

play19:57

ఆపెరెండ్లలో ఒకటి నిజమైనప్పుడు. ఇప్పుడు,

play19:58

మనకు చివరి స్థానం మిగిలి ఉంది మరియు

play19:59

ఈ రెండు బైనరీ కోడ్లకు చివరి స్థానం 1. మరియు

play20:00

నేను ఈ విలువను నా ఫలితంలో సంబంధిత

play20:01

స్థానానికి కాపీ చేయబోతున్నాను బైనరీ

play20:02

కోడ్. కాబట్టి, మీరు బిట్వైస్గా లేదా

play20:03

రెండింటి మధ్య అప్లై చేసినప్పుడు మీకు

play20:04

లభించే బైనరీ కోడ్ ఇది.

play20:05

పూర్ణాంకాలు. ఇది మనం ఇంతకు ముందు

play20:06

ప్రారంభించిన 7 కోసం బైనరీ కోడ్ మరియు

play20:07

ఇది కొంచెం తెలివైనది లేదా ఆపరేటర్ రెండు

play20:08

పూర్ణాంకాల మధ్య పనిచేస్తుంది. మేము

play20:09

బిట్వైస్ ఆపరేటర్లను కూడా ఉపయోగించవచ్చు

play20:10

షరతులతో కూడిన ప్రకటనలు. ఇప్పుడు, నేను రిలేషనల్

play20:11

స్టేట్మెంట్ కోసం బిట్వైస్ లేదా ను

play20:12

ఉపయోగిస్తే, ఇది ఇలా కనిపించవచ్చు.

play20:13

కాబట్టి, నేను ఇక్కడ రెండు షరతులతో కూడిన

play20:14

ప్రకటనలు ఇస్తున్నాను. మొదటిది ఎక్కడ x అనేది

play20:16

y కంటే తక్కువగా ఉందో లేదో నేను తనిఖీ

play20:17

చేస్తున్నాను; రెండవది x అనేది yకి సమానంగా

play20:18

ఉందో లేదో నేను తనిఖీ చేస్తున్నాను.

play20:20

ఇప్పుడు, నేను ఈ సందర్భంలో ఉన్నాను x అనేది y

play20:21

కంటే తక్కువగా ఉంటుంది, ఇది నిజమైన విలువకు

play20:25

దారితీస్తుంది మరియు అయితే, x కి సమానంగా

play20:29

మరియు y కి సమానంగా ఉండే రెండవ షరతులతో

play20:31

కూడిన ప్రకటనలు తప్పు అవుతాయి. ఈ సందర్భంలో,

play20:32

మొదటి షరతు నిజం, అందువల్ల మీకు లభించే

play20:33

అవుట్పుట్ కూడా నిజం. కాబట్టి, ఇప్పుడు

play20:34

ఆపరేటర్ల ప్రాధాన్యతను చూద్దాం, నేను ఆపరేటర్లను

play20:35

ఆదేశించాను ప్రాధాన్యత యొక్క తగ్గుతున్న

play20:36

క్రమం. కాబట్టి, నేను ఇంతకు ముందు పేర్కొన్నట్లుగా

play20:37

కుండలీకరణము ఆపరేటర్ కాదు. ఇప్పుడు, కుండలీకరణాల

play20:38

లోపల పరివేష్టిత ఆపరేటర్లతో ఏదైనా

play20:39

వ్యక్తీకరణ ఉంటే వారు అగ్రస్థానంలో

play20:40

ప్రయారిటీ.

play20:41

ను పొందుతారు. కాబట్టి, అందుకే కుండలీకరణాలు

play20:42

ఎల్లప్పుడూ ప్రాధాన్యత పరంగా మొదటి పంక్తిని

play20:43

ఆక్రమిస్తాయి. ఇప్పుడు, కుండలీకరణాల తరువాత

play20:44

నాకు ఘాతాంక ఆపరేషన్ ఉంది, తరువాత విభజన,

play20:45

గుణకారం, అదనంగా మరియు వ్యవకలనం అదే

play20:46

ప్రాధాన్యత ఇవ్వబడతాయి, నేను దానిని అనుసరిస్తాను

play20:47

నా బిట్వైస్ మరియు బిట్వైస్ లేదా, అన్ని

play20:48

రిలేషనల్ ఆపరేటర్లకు ఒకే ప్రాధాన్యత ఇవ్వబడుతుంది.

play20:49

ఆపై తార్కిక NOT, తార్కిక AND, మరియు తార్కిక

play20:50

OR వస్తుంది. కాబట్టి, ఇది తగ్గుతున్న క్రమం

play20:51

అన్ని ఆపరేటర్లకు కలిసి ప్రాధాన్యత.

play20:52

కాబట్టి, ఈ ఉపన్యాసంలో సంగ్రహంగా చెప్పాలంటే

play20:53

మనం ఏమి చూశాము ముఖ్యమైన ఆపరేటర్లు. అంకగణితం,

play20:54

అసైన్మెంట్, రిలేషనల్, లాజికల్ మరియు ఏమిటో

play20:56

చూశాము. బిట్వైస్ ఆపరేటర్లు చేస్తారు.

play20:57

ఆపరేటర్ ఎలా ఉంటాడో వివరించడానికి మేము

play20:59

ఈ ప్రతి కేసులో ఒక ఉదాహరణను కూడా తీసుకున్నాము.

play21:02

పని చేస్తుంది మరియు అవుట్పుట్ యొక్క

play21:03

స్వభావం ఏమిటి. ధన్యవాదాలు .

Rate This

5.0 / 5 (0 votes)

Related Tags
OperatorsArithmeticAssignmentRelationalLogicalBitwiseProgrammingPythonSyntaxCodeTutorial