True or False 10 pts a In the Pep8 simulator the assembly co
True or False? (10 pts)
a. In the Pep8 simulator, the assembly command “LDA 0x0000.i” clears register A to all zeros.
b. In the Pep8 simulator, the assembly command “ADDA 0x000B.i” adds the number 12 (decimal) to register A.
c. I can add an integer variable to a floating-point variable.
d. Characters are a type of variable that allows text values, like “Albert”.
e. Boolean variables can only have one of two values.
f. The result of this statement: x = (a OR b) AND (c OR d) will yield a “true” value for Boolean variable x, if the other Boolean variables (a, b, c and d) are all “false”.
g. In a Java string array called NamesofRobert = {“Rob”, “Bob”, “Bert”, “Roberto”, “Dude”}, the string “Bert” is called up with NamesofRobert[2].
h. In a Java string array called NamesofRobert = {“Rob”, “Bob”, “Bert”, “Roberto”, “Dude”}, NamesofRobert[0] yields no answer.
i. The pseudocode statement “if ((a > 10) OR (b <= 7)) then shut down computer” will result in a shutdown of the computer if a = b = 7.
j. The pseudocode statement “if ((a > 10) OR (b <= 7)) then shut down computer” will result in a shutdown of the computer if a = 9 and b = 10.
Solution
a- True
b- False
c- False it will be a compile time error
d- false because characters allow only one entry at a time but we can add multiple characters using a character array or string.
e- True boolean variables can have either true value or a false value.
f- False as al the variables are false it will yeild a false value for x.
g- true because index values start with 0.
h- false it will yeild Rob
i-yes it will result in shut down because here b=7 and it is satisfying the condition.
j-false because both the conditions are returning false for a=9 and b=10
