Design a 1bit ALU that will perform bitwise addition AND, OR & NOT on 1 bit input x and y. 1 bit output z is produced for the case addition.the carry is zero for AND OR & NOT
A hazard we did not deal with in HW12 is the modify-store hazard, which occurs when a store instruction stores a value that was modified in the previous few instructions. You specifically need to handle the cases where the value was modified in the instruction 1 before or 2 before the store instruction. For example case 1: add r1, r0, r0 sw r1, 4(r3) case 2: add r1, r0, r0 sub r2, r3, r0 sw r1, 2(r3) (r1=r0+r0) (mem[4+r3]=r1) (r1=r0+r0) (r2=r3-r0) (mem[2+r3]=r1 You willmodify the provided pipeline-start.circ Logisim file to add handling of this hazard. You should NOT handle any other hazards or cases besides the 2 described above. You may not start with your solution to HW12, you must use my start file or grading will be impossible. The provided circuit handles the basic pipeline datapath with the addition of the NOP instruction. It also handles pipeline startup by sending a NOP through from the initial decode stage, then the actual instructions for the rest of the run. Your program should work no matter what the first few instructions are, or what instructions precede the store. For example, a store after a NOP or branch should not forward from that previous instruction, though it still may forward from the instruction 2 previous if appropriate. Also, your program should be able to start with any instruction from the implemented set of instructions, e.g. add r0, r0, r0.
This question refers to the below PDP8 datapath that is valid only for instructions with op codes 0-5 (the 6 standard memory-based instructions), and only for direct-access (the indirect stage is not included). So far, we have pretended on our PDP8 datapath that control lines come out of nowhere (magic!) Actually, the control lines come from a control unit that takes input from a few different sources. For the subset of instructions supported by the datapath above, the control unit will input the 3-bit op code of the instruction (held in the IR), and a single bit from the Major State Generator. The op code determines which instruction to execute (000=AND, 001=TAD, 010=ISZ, 011=DCA, 100=JMS, 101=JMP), and the state bit determines in which state the datapath is currently functioning (0 for fetch, and 1 for execute). This question ignores the other 2 op codes and the indirect stage. Of the control values shown in blue on the diagram above, all can be set using these 4 bits except “Page”. We have not discussed the PDP8 ALU, so you can ignore the ALUop control, but you should be able to determine the rest.Give a minimal logic expression for each of the control values. Set “don’t-care” values strategically to minimize the expressions. Usec2, c1,andc0to represent the 3 bits from the op code, withc2most significant. Usesto represent the state bit. Minimize each expression however you want, but given the 4 input bits, one Karnaugh map for each control will definitely work. As an example, the minimal expression forIRwis just~s(not s), as IR should be written always when in the fetch state, and never when in the execute state. The rest are probably more complicated. Notes on this datapath implementation: – ISZ uses the ALU to add 1 to the read data and write the result back to memory. The actual skip logic is not shown and you do not have to explain it, only the controls that are shown in blue. – DCA uses the ACin MUX to write a 0 to the AC instead of the ALU output. – You can just ignore the link bit.
Develop a banking solution with following menu options using Python and command line interface: 1. Create account INPUT: Full name, initial balance (min. Rs. 5,000) OUTPUT: Account number (new) 2. Balance enquiry INPUT: Account number OUTPUT: Balance
What is the difference between persistent and transient objects? How is persistence handled in typical OO database systems?
1-a. Add a feature to the expression parsing code1-b. Verify through testing with pytest and direct connection that the expression parser works on some feature you have added.2. Verify using requests and pytest that some API on this list works correctly: https://github.com/toddmotto/public-apis3. Verify using webdriver and pytest that either “Oster” or “Hamilton Beach” is one of the blenders brands sold on Amazon on the “blender” search page.
Question 1 You are required to implement the following modes of operation: Electronic Codebook (ECB) Cipher Block Chaining (CBC) Cipher Feedback (CFB) Output Feedback (OFB) You may use any publicly available AES code or the AES code provided Blackboard. Provide the details of the source of the AES code that you use. Note that the implementation of the modes should be your own. [3 marks] Question 2 After implementation of these four modes, you are required to encrypt an image while preserving the image structure, i.e. apply AES only on the image data, keeping the header intact. Note that images encrypted while preserving image header should be viewable using standard image viewer applications (the content could be arbitrary). Criteria for choosing the input image is as follows: Compute the sum of characters of yourfirst nameand last namemodulo 26 (Characters are numbered from 0 to 25, A or a being 0 and Z or z being 25). Refer to the following ranges to determine which images to use for encryption: 0 – 8 : triangle.jpg 9 – 17: circle.jpg 18 – 25: rectangle.jpg The three images are provided in thedatafolder. Along with these images, you are required to select two more images from publicly available images of landscapes (keywords: landscape, beach, lake, mountains etc.) with visible repeated patterns. Choose images with size 800 x 600 pixels. Analyze the output of encryption using all four modes of operation and report your observations. [3 marks] Question 3 Analyze and report the error propagation properties of different modes of operations by performing the following tests (on all three images) as mentioned in Question 2: (a) Introduce an error in a cipher text block of the encrypted images. Analyze and report the number of blocks affected in the resulting decrypted plain text. Also, specify the particular block number you have corrupted. (b) Introduce an error in a plain text block of the images. Analyze and report the number of blocks affected in the resulting cipher text and the decrypted plain text. Report your results for all four modes of operation (ECB, CBC, CFB, and OFB) with all three images in your data set. Report the index position of the block you introduced the error in, number of blocks affected, the percentage error and your observations. You can compute the percentage error using the formula: Submission You must submit the following via UAlbany Blackboard:(a) Source code along with the instructions to run it.(b) A pdf file containing answers to Questions 2 and 3.(c) A video (of max 5 minutes) that shows the working of your program.
In the usual MIPS instruction set,swandlwcalculate the memory address by adding the immediate to a register. For example,sw$t0, 4($t1) stores the value in $t0 to the address $t1+4.You could, however, designswandlwdifferently, such that they add 2 register values to determine the memory address, instead of using the immediate. For example,sw$t0, $t1($t2) would store the value in $t0 to the address $t1+$t2. Describe in detail how you would change the MIPS single-cycle datapath to implement these new stores/loads. You can do this by implementing the changes in Logisim to the simplified singleCycle.circ file I have provided. modifying the standard datapath diagram to show the new components/paths,AND describing in words the new flow for stores/loads. In either method, the datapath NO LONGER needs to implement the old style of stores/loads, but should still support the other instructions we have discussed (e.g. add, addi, beq, etc.). Be sure to consider any units (registers, MUX’s, etc.) you would need to add, or how you would use the existing pieces differently. Also, make clear any control values you would need to add/modify and how you would use them.
Assume that each of the 5 stages in our standard MIPS pipelined datapath takes 200ps (picoseconds) to complete. We want to add some extra hardware, and have 2 options. Mod1: we could add several more stages to the datapath so that there are 8 total. The longest stage is still the same 200ps. Mod2: We could add everything to the first of our current stages which will make the first stage take 250ps, the rest will remain unchanged. Answer the following questions about the 2 modification options; brieflyshow your workor explain your reasoning. State thetotal timeto execute a single instructionfor eachof the modified datapaths. State the approximateaverage time per instructiongiven many instructions to executefor each of the modified datapaths. Which modification would you choose to make, and why?Be specificin your reasons!
Task1: (Language C#)This task should take less than 10 minsIn that lab, we created a convertorclass and implemented 5 methods for converting distances from one unit to another:a. Miles to Feet b. Feet to Inches c. Feet to Miles d. Inches to Feet e. Miles to inchesIn this lab, you will be implementing these methods as anonymous methods using lambda expressions within a single method/function, instead of separate functions. You must also check for invalid inputs and prompt the user before passing these onto the functions. You should still prompt the user to specify what unit conversion they want to perform as well as the distance they need converted. Your program should make the appropriate method call based on the responses from the user.Task 2: (Language C#)In this task you will use an anonymous method to perform string manipulations. You may implement the code in a different function within the class that contains theMain()method. Given a string of digits, you are to write a program that converts that string into English words. For example, 2905 should return “two thousand, nine hundred and five”. Assume that the maximum number of digits your program accepts is 9. Use an anonymous function that accepts a string and returns a string. This utility is useful in financial applications that need to convert amounts to text for reporting purposes.Additionally, implement another function that converts a text of words to numbers. As anexample, the “three hundred and five” should return 305 as an answer.For this task your user is asked to specify which action they are interested in performing: i.e. number to words or words to numbers. Based on their selection, call the appropriate anonymous function.