What are expressions?

Humans use facial expressions as an effective way of non-verbal communication such as to convey messages, whereas computers use weighted expressions for operations.

Facial expressions

Facial expressions are involuntary or purposeful manipulation of muscles in our face to convey a message or to showcase an emotion. The human face has 43 muscles and this enables them to produce over 1000 facial expressions.

  • Cross-culture common expressions are:
  • Happiness- Rounded eyes, raised lips, and cheeks
  • Disgust- Dropped eyelids, raised lips, and wrinkled nose
  • Fear- Deformed eyes, opened mouth
  • Anger – Opened eyes, stare, lowered eyebrows
  • Surprise- Raised mid eyebrow, opened eyes, opened mouth
  • Sadness- Drooped mouth and lowered eyes

Facial expressions can be classified into two different categories.

  1. Posed facial expressions are used for non-verbal communication in any social situation. They are produced in the cerebral cortex of the human brain that is responsible for thought, language, and consciousness.
  2. Emotional facial expressions are generated by reactions to the surroundings or stimuli. These are not created in the cerebral cortex. Consequently, they cannot have a conscious reaction.

Facial expressions enable a person to have better communication and a deeper understanding of their surroundings. A facial expression can be exemplified by the expression of sadness, where words from lips are pulled down and the middle part of the eyebrow is raised. An expression similar to this will engage nonverbal communication that the person is sad and the surrounding people can understand it and can take needed action.

Micro expressions

The hidden feelings and thoughts of a human body can be understood from unconscious expressions, known as micro facial expressions. These are involuntary expressions that only last for a second. Micro-expressions do not rely on the awareness of a person because they are rapid and honest. Learning to read micro-expressions can help to find the differences between situations, and congenitally categorize people based on body language. Basic emotions such as fear, happiness, sadness, and disgust come under common facial expressions. According to the context of these universal facial expressions, human beings can be classified as expressive or non-expressive.

Advantages of facial expressions

The universality of facial expressions can give the upper hand as compared to the conversation through words. Conveying information by using words is not cross-cultural appropriate. Verbal communication is limited by the local language, so facial expressions are preferred to convey emotions.

Cognitive perspective of facial expressions

Emotional behavior is a key gesture of expressing emotion and is a mode of basic survival and public interaction. Basic emotions are governed by simple rules by making them acceptable, irrespective of a place. A facial expression as any other human function has evolved to the current versatility. The production and perception of these expressions are categorized as cognitive processes. The cerebral, cortical, and subcortical areas play an important role in governing emotions and facial expressions. Each emotional state has its unique stimuli.

Computer expressions

Computer expressions contain an assorted arrangement of operators, operands, variables, and constants. A single expression can have one or more than one operand to return an output. Expressions can concatenate together to form compound expressions.

Basic parts of a computer expression, representing operands and operators.

Expressions can be divided into various categories depending on the type of operand and the return value.

Algebraic expressions

Algebraic expressions use algebraic operators along with numeric operands. These perform algebraic operations like addition, subtraction, division, and multiplication. Other algebraic operations include finding the root and the power of numeric data. It also includes the Modulus operator. Multiple operators can be used in a single expression in context with the needed result. While using multiple operators, the compiler can follow the operator precedence. For instance, if there are three operators in an expression, then the operator with the highest precedence will be carried out first.

Arithmetic operators in descending order of precedence

  • ** power
  • % modulus
  • * multiplication
  • / division
  • + addition
  •  - subtraction

Constant expressions

Constant expressions are constructed using constants. A constant variable is an attribute that does not change its value throughout the program.

Integral expressions

Integral expressions return an integer value as the output. The operands used in this expression are integers. Input can be changed into integer data types by automatic and explicit conversions.

Relational expressions

Relational expressions use Boolean algebra and the return value is a result of the two-element set. It can be either true or false. The operand of the relational operator can be arithmetic expressions. These expressions are compared according to the relational operator, and the results are taken in a Boolean format. Relational expressions are also known as Boolean expressions.

Floating expression

The return value of a floating expression is a floating-point data type.

Logical expression

The output value of the logical expression is bool or binary value. It is a combination of relational expressions that contain multiple expressions operated in a sequence. The only non-zero output will be one.

Bitwise expression

Manipulation of data on the bit level is achieved by a bitwise expression. These include shifting positions to the left or right.

Pointer expression

The pointer shows an address of the memory location associated with the variable. Pointer expressions return these addresses. The operands that are used is the variables and pointers

Expression language

Syntax- ${expr}

Expr is the expression and {} is considered an attribute. Every line of code inside the braces can be sent to the output interface and is evaluated during the runtime of the program. Expressions can be combined, concatenated, addition can be a mixture of static text and numeric values.

As with other programming languages, java controls the flow of the statements using decision-making and loop statements.

Common operators that are used in expression language are

To access the bean property.
To access the list or an array[]
To group expressions into blocks to manipulate the order of evaluation()
Equal to==
Not equal to!=
Less than
Greater than
Less than or equal to<=
Greater than or equal to>=
Logical AND&&
Logical OR||
Boolean compliment!
Empty variable valueempty
Various operators

Context and Applications

  • Bachelors in Computer Science
  • Masters in Computer Science
  • Masters in Cognitive Science

Practice Problems

Question 1) How many muscles does the human face have?

  1. 33
  2. 43
  3. 45
  4. 73

Answer- Option b

Explanation- Human face has 43 muscles.

Question 2) Complete the sentence. "Emotional facial expressions are __________".

  1. created in the cerebral cortex
  2. not created in the cerebral cortex
  3. planned
  4. None of these.

Answer- Option b

Explanation- Emotional expressions are not created in the cerebral cortex.

Question 3) What are the operands of floating expressions?

  1. Decimal numeric data
  2. Integers
  3. Word
  4. String

Answer- Option a

Explanation- Operands of floating expressions are float data types.

Question 4) Which of the following in combination creates a Logical expression?

  1. Relational expressions
  2. Integer expression
  3. Boolean expression
  4. Both a and c

Answer- Option d

Expression- Logical expressions are the combination of relational expressions. Relational expression is also known as boolean expressions.

Question 5) Which of the following is used to represent Logical OR?

  1. &&
  2. **
  3. $$
  4. ||

Answer: Option d

Explanation- Logical OR is depicted by ||.

Common Mistakes

Expression is a common term shared by various subject domains and because of this overlap, confusion can occur. Expression is widely used in computer applications. It has a wide range of applications from simple programs to creating web page interfaces. Expression is also used in cognitive studies to describe human emotional behavior and even used to describe speech and language statements. Moreover, care must be taken while choosing the correct descriptions.

Facial expressions depict different meanings regarding the difference in situations by translating them to words that should be done with care.

Computer expressions follow strict syntax rules, and mistakes in word syntax can cause compiler errors. Any abnormality in code can be reflected in the output and can affect the flow of the program.

  • Facial Expression meaning analysis
  • Cognitive Science- Cogn 
  • Expressions in python
  • Expressions in java

Want more help with your computer science homework?

We've got you covered with step-by-step solutions to millions of textbook problems, subject matter experts on standby 24/7 when you're stumped, and more.
Check out a sample computer science Q&A solution here!

*Response times may vary by subject and question complexity. Median response time is 34 minutes for paid subscribers and may be longer for promotional offers.

Search. Solve. Succeed!

Study smarter access to millions of step-by step textbook solutions, our Q&A library, and AI powered Math Solver. Plus, you get 30 questions to ask an expert each month.

Tagged in
EngineeringComputer Science


Fundamentals of Programming

Types of Expressions

Types of expressions Homework Questions from Fellow Students

Browse our recently answered Types of expressions homework questions.

Search. Solve. Succeed!

Study smarter access to millions of step-by step textbook solutions, our Q&A library, and AI powered Math Solver. Plus, you get 30 questions to ask an expert each month.

Tagged in
EngineeringComputer Science


Fundamentals of Programming

Types of Expressions