Computer Science Homework Help

I need help in information technology programming Fact: The assignment operator is most commonly represented in programming as the single equal symbol (=). Naturally, this leads beginning programmers

I need help in information technology programming

Fact: The assignment operator is most commonly represented in programming as the single equal symbol (=). Naturally, this leads beginning programmers to mistake it to mean what the equality operator means (==).

Question 1: In detail, what are the steps that a computer performs when executing the x2 = x1 line of the following program on an ITP – 100 Erase, Copy, then Put Machine.

Declare Single Character x1;

Declare Single Character x2;

x1 = input();

x2 = x1; // <<<— This is the line!

print x2;

Question 2: Assume that the variables a and b are both of type Strings.

(Reminder: ^ is the XOR operator.)

Expression 1:

a ^ b

Expression 2: 

a == “Waldo” ^ b == “Waldo”

Fact: A computer can’t execute expression 1.

Fact It can execute expression 2.

Question: Why is expression 1 nonsense to the computer, yet expression 2 is perfectly understandable?

 
"Our Prices Start at $11.99. As Our First Client, Use Coupon Code GET15 to claim 15% Discount This Month!!"