Answer:
For 32 bits Instruction Format:
OPCODE DR SR1 SR2 Unused bits
a) Minimum number of bits required to represent the OPCODE = 3 bits
There are 8 opcodes. Patterns required for these opcodes must be unique. For this purpose, take log base 2 of 8 and then ceil the result.
Ceil (log2 (8)) = 3
b) Minimum number of bits For Destination Register(DR) = 4 bits
There are 10 registers. For unique register values take log base 2 of 10 and then ceil the value. 4 bits are required for each register. Hence, DR, SR1 and SR2 all require 12 bits in all.
Ceil (log2 (10)) = 4
c) Maximum number of UNUSED bits in Instruction encoding = 17 bits
Total number of bits used = bits used for registers + bits used for OPCODE
= 12 + 3 = 15
Total number of bits for instruction format = 32
Maximum No. of Unused bits = 32 – 15 = 17 bits
OPCODE DR SR1 SR2 Unused bits
3 bits 4 bits 4 bits 4 bits 17 bits
Answer:
public class GetInfo{
Beverage[] beverages=new Beverage[100];
int i=0;
GetInfo(Beverage b){
beverages[i]=b;
i++;
}
public void Display(){
for(int i=0;i<beverages.length;i++)
cout<<beverage[i].tostring();
}
Explanation:
we are taking Beverages array to store all values and in constructor we are adding that to the list and Display() function prints the vale
Answer:
Let's convert the decimals into signed 8-bit binary numbers.
As we need to find the 8-bit magnitude, so write the powers at each bit.
<u>Sign -bit</u> <u>64</u> <u>32</u> <u>16</u> <u>8</u> <u>4</u> <u>2</u> <u>1</u>
+25 - 0 0 0 1 1 0 0 1
+120- 0 1 1 1 1 0 0 0
+82 - 0 1 0 1 0 0 1 0
-42 - 1 0 1 0 1 0 1 0
-111 - 1 1 1 0 1 1 1 1
One’s Complements:
+25 (00011001) – 11100110
+120(01111000) - 10000111
+82(01010010) - 10101101
-42(10101010) - 01010101
-111(11101111)- 00010000
Two’s Complements:
+25 (00011001) – 11100110+1 = 11100111
+120(01111000) – 10000111+1 = 10001000
+82(01010010) – 10101101+1= 10101110
-42(10101010) – 01010101+1= 01010110
-111(11101111)- 00010000+1= 00010001
Explanation:
To find the 8-bit signed magnitude follow this process:
For +120
- put 0 at Sign-bit as there is plus sign before 120.
- Put 1 at the largest power of 2 near to 120 and less than 120, so put 1 at 64.
- Subtract 64 from 120, i.e. 120-64 = 56.
- Then put 1 at 32, as it is the nearest power of 2 of 56. Then 56-32=24.
- Then put 1 at 16 and 24-16 = 8.
- Now put 1 at 8. 8-8 = 0, so put 0 at all rest places.
To find one’s complement of a number 00011001, find 11111111 – 00011001 or put 0 in place each 1 and 1 in place of each 0., i.e., 11100110.
Now to find Two’s complement of a number, just do binary addition of the number with 1.
Answer:
A Standard Lens
Explanation:
Since David wants to take pictures of people around him and also the objects far away, a standard lens would be fit for that.
Answer: Machine learning
Explanation:
The technology that could be combined with the current solution to do this is the machine learning.
Machine learning refers to the use and development of the computer systems which can learn and adapt without them following explicit instructions. This is done through the use of statistical models and algorithms in order to analyse inferences from the patterns in data.
Since the bank wants to streamline their operations for the receiving and processing checks while also enhancing the solution to recognize signs of potential check fraud, then the machine learning can be used.