Need help with these computer science questions dealing with cpu and assembly language
3. We can also use masking to examine or set a particular bit in a memory location or register. This involves using the logical op- erations AND and OR, one of whose operands is the memory loca- tion/register and the other is a binary mask, a string as long as the memory location/register. Given this information: (a) Describe how you would clear a particular bit, say 4, in register o, leaving all other bits alone; i.e., what is the logical operation, and what would the mask look like? (b) Show how you would do this in the PC's assembly language (c) Describe how you would set bit 4 in register o, leaving all other bits alone. (d) Show how you would do this in the PC's assembly language. 4. In addition to the logical operations AND and OR, which if any of the following could you also use for masking? Explain your answers. (a) XOR (b) NAND (c) NOR 5. Suppose you are a CPU designer, and Pixar asks you to design a new special-purpose CPU for rendering (i.e, drawing) frames of their computer-animated movies. Would you give them a RISC or a CISC CPU? Why? 6. When an interrupt occurs, a CPU's registers are saved by the hard- ware itself to a particular place in memory, usually the stack. The CPU then executes instructions necessary to handle the interrupt. After the interrupt is handled, the values of the registers are re- stored by the hardware. How does the CPU know where (i.e, at which memory address) to resume the program it was working on before the interrupt? 7. Suppose you are designing a C that will have 130 instructions (a) How many bits are needed for the op code in each instruction? (b) Is this wasteful? If not, why not? If so, what might you do to avoid the waste? 3. We can also use masking to examine or set a particular bit in a memory location or register. This involves using the logical op- erations AND and OR, one of whose operands is the memory loca- tion/register and the other is a binary mask, a string as long as the memory location/register. Given this information: (a) Describe how you would clear a particular bit, say 4, in register o, leaving all other bits alone; i.e., what is the logical operation, and what would the mask look like? (b) Show how you would do this in the PC's assembly language (c) Describe how you would set bit 4 in register o, leaving all other bits alone. (d) Show how you would do this in the PC's assembly language. 4. In addition to the logical operations AND and OR, which if any of the following could you also use for masking? Explain your answers. (a) XOR (b) NAND (c) NOR 5. Suppose you are a CPU designer, and Pixar asks you to design a new special-purpose CPU for rendering (i.e, drawing) frames of their computer-animated movies. Would you give them a RISC or a CISC CPU? Why? 6. When an interrupt occurs, a CPU's registers are saved by the hard- ware itself to a particular place in memory, usually the stack. The CPU then executes instructions necessary to handle the interrupt. After the interrupt is handled, the values of the registers are re- stored by the hardware. How does the CPU know where (i.e, at which memory address) to resume the program it was working on before the interrupt? 7. Suppose you are designing a C that will have 130 instructions (a) How many bits are needed for the op code in each instruction? (b) Is this wasteful? If not, why not? If so, what might you do to avoid the waste