Evaluate the following expressions by performing binary arithmetic.
a.) (100101+101101)(100101-101101)
b.) (111011+10101)(110111-101101)
Evaluate the following expressions by performing binary arithmetic. a.) (100101+101101)(100101-101101) b.) (111011+10101)(110111-101101)
Add the following two’s complement numbers. Check your work by converting the binary numbers to decimal and performing the addition. Note if the result overflows the range or now. a) 0100 + 1011 b) 110001 + 111011 c) 10111001 + 01111010
Convert the following arithmetic expressions from reverse Polish notation (RPN) to infix notation : A B C * + D / E F + * A B C D E F G + * + * + *
6. Convert .3710 to a binary fraction of 10 binary digits. 7. Use two's compliment arithmetic to perform the following 8 bit binary operations. a. 0010 1110 + 0001 1011 b. 0101 1101 – 0011 1010 c. 1011 1000 – 1000 1011 d. 1000 1100 – 1111 0111 8. Convert 150.8476562510 to IEEE Floating Point Standard. 9. Simplify the following Boolean expressions. a. xy + xy + xz b. (w + x)(x + y)(w + x + y + z)...
B)(5 points) Consider the binary tree representing the following arithmetic expression (sign $ stands for exponentiation (power) operation): A/(B+C) * DS (E - F) Draw the tree structure C(5 Points) Draw a binary tree whose inorder traverse is : T, W, K, C,M , X, S, A, B,R and preoorder traverse is : X, C, T, K,W,M,S, B, A,R
5. Divide the following numbers: 10110111 by 1010 (binary) 11010110 by 10101 (binary) 1101010 by 101 (binary)
3. Consider the following BNF for arithmetic expressions: <expression> ::= <term> <term>+ <expression> | <term> - <expression> <term> ::= <factor> | <factor> * <term> | <factor> I <term> <factor> ::= <constant> (<expression>) <constant ::= 0|1|2|3|4|5|6789 a) Show the expression tree of the following expression: 8/7*5/6-6/4/2-7*(5+2). b) Give the value of this expression. c) Same question as (a), if the BNF were <expression> ::= <term> | <expression>+ <term> | <expression> - <term> <term> ::= <factor> | <term>*<factor> | <term> / <factor>...
3- Perform the following mathematical operations using binary arithmetic. Use 8 bits of precision for each of the operations. (43)10 (13)10 4- Perform the following mathematical operations using binary arithmetic. Use 8 bits of precision for each of the operations. (11)10 (9)10
2. Matrix A = Matrix B = log(A) Write MATLAB expressions to do the following. Evaluate the sum of the first row of B Evaluate the maximum value in the vector resulting from element-by-element multiplication of the first column of B with the third column of A. Use element-by-element division to divide the third row of A by the first three elements of the second column of B and evaluate the sum of the elements of the resulting vector.
1. Consider the following BNF definition of arithmetic expressions: <expression> <expression>+ <term> | <expression>-<term> <term> <term> ::= <term>*<factor> <term>/<factor> | <factor> <factor> :: <digit>«<exponent> | <didgit>^«<exponent> <digit>(<expression> <digit>:= 01|2|3|4151617181910. <exponent> :: <sign> <val> <sign>=+1 - <val 1121314 Draw the expression trees of the following expressions, parsed according to the BNF above. a) 46 - 6/4-243. b) 4*6 -(6/4 - 243) c) 31-2-3*2 + 3/2 d) 3^2*5. e) ((3^2)).
Determine the result you would get by typing the following arithmetic expressions into MATLAB. Assume x=4 and y=2. a. 3 ^2 – 1 b. 4 +4 / 2 – 1 c. x +4 * y d. y ^ ( x – 1)