Answer:
- common = []
- num1 = 8
- num2 = 24
- for i in range(1, num1 + 1):
- if(num1 % i == 0 and num2 % i == 0):
- common.append(i)
- print(common)
Explanation:
The solution is written in Python 3.
Firstly create a common list to hold a list of the common factor between 8 and 24 (Line 1).
Create two variables num1, and num2 and set 8 and 24 as their values, respectively (Line 3 - 4).
Create a for loop to traverse through the number from 1 to 8 and use modulus operator to check if num1 and num2 are divisible by current i value. If so the remainder of both num1%i and num2%i will be zero and the if block will run to append the current i value to common list (Line 6-8).
After the loop, print the common list and we shall get [1, 2, 4, 8]
software programming like adobe flash.
Answer:
Explanation:
b) Each stage requires one clock cycle; ... Calculate how many clock cycles will take execution of this segment on the regular (non- pipelined) ... Instruction. Clock cycle number . 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 ... It is possible ... It means that all stages of 5-stage pipeline are always busy (no stalls) during the task.
we translate the following statement given in terms of logarithms. 211 base x can be expressed into log 211 / log x while 152 base 8 can be expressed int o log 152 over log 8. In this case,
log 211 / log x = log 152 / log 8log x = 0.962x = 10^0.962 = 9.1632