Answer:
c. your friend can hash all possible options and discover your secret.
Explanation:
SHA-256 is a set of hash functions that was designed by the NSA. SHA-2 is considered an upgrade on the set that was its predecessor, SHA-1. A hash is a mathematical function that condenses data in a process of one-way encryption. SHA-256 creates hash algoritms that are considered irreversible and unique. However, one of the properties of hashing algorithms is determinism, which means that any computer in the world would be able to compute a particular hash and get the same answer.
Answer:
a. 2^6, or 64 opcodes.
b. 2^5, or 32 registers.
c. 2^16, or 0 to 65536.
d. -32768 to 32768.
Explanation:
a. Following that the opcode is 6 bits, it is generally known that the maximum number of opcodes should be 2^6, or 64 opcodes.
b. Now, since the size of the register field is 5 bits, we know that 2^5 registers can be accessed, or 32 registers.
c. Unsigned immediate operand applies to the plus/minus sign of the number. Since unsigned numbers are always positive, the range is from 0 to 2^16, or 0 to 65536.
d. Considering that the signed operands can be negative, they need a 16'th bit for the sign and 15 bits for the number. This means there are 2 * (2^15) numbers, or 2^16. However, the numbers range from -32768 to 32768.
I have a very good example of the program you need written on Python. You can use this (sorry for bad tabulation):
import math
import math
def main():
function = input("Enter a function f(x):\n")
x = 0
y = 0
for rows in range(10,-11,-1):
for col in range(-10,11,1):
x=col
roundfx = round(eval(function))
if roundfx == rows:
print("o", end="")
if rows==0 and col==0 and not rows == roundfx:
print("+", end="")
if col == 0 and not rows == 0 and not rows == roundfx:
print("|", end="")
if rows==0 and not col==0 and not rows == roundfx:
print("-", end="")
else:
if not rows == 0:
if not col == 0:
if not rows == roundfx:
print(" ", end="")
print()
main()
Answer: what do you mean exactly?
This is for Python
number = int(input('Number: '))
number = number * 12
print(number)