1. 2. 3. 4. a) b) c) d) e) f) g) Lab 5 – IEEE 754 Computer Architecture Due December 7th at midnight The purpose of this activity is to implement fundamental concepts of IEEE 754 floating point...

I have attached the file here


1. 2. 3. 4. a) b) c) d) e) f) g) Lab 5 – IEEE 754 Computer Architecture Due December 7th at midnight The purpose of this activity is to implement fundamental concepts of IEEE 754 floating point conversions with computer memory. The lab is intended to make the student think about minutia in the machine's context. To that end, the work is meant to be tedious. Background for tasks 1 to 3 below You will represent an encrypted version of your the first five letters of your last name in the IEEE 754 Floating Point Standard in CPU registers and in computer memory. (If your last name has fewer than five letters, then append some letters from your first name.) For the memory representation, assume that random access memory is available from address 0x20000000 to 0x3FFFFFF. Note, that when stored to memory, four characters are packed to each ARM word, the first character being in the least significant byte. For the CPU registers, each character gets its own word, as it is stored in the least significant byte while the other three bytes are set to zero. We are assuming 8-bit characters. For example, given the name “Harry” Unicode decimal: 72 97 114 114 121 Unicode binary: 01001000 01100001 01110010 01110010 01111001 IEEE 754 floating-point representation of: H: 01000010100100000000000000000000 a: 01000010110000100000000000000000 r: 01000010111001000000000000000000 r: 01000010111001000000000000000000 y: 01000010111100100000000000000000 Representation in memory: H: 0x20000000 01000010 0x20000001 10010000 0x20000002 00000000 0x20000003 00000000 a: 0x20000004 01000010 0x20000005 11000010 0x20000006 00000000 0x20000007 00000000 r: 0x20000008 01000010 0x20000009 11100100 0x2000000A 00000000 0x2000000B 00000000 r: 0x2000000C 01000010 0x2000000D 11100100 0x2000000E 00000000 0x2000000F 00000000 y: 0x20000010 01000010 0x20000011 11110010 0x20000012 00000000 0x20000013 00000000 Next, use the IEEE 754 floating-point standard with floating-point arithmetic and a formula which encrypts those names. Accordingly, each character of a name is encrypted using the following formula: (character_unicode_value + length_of_name) * e / π Where π = 3.1415... and e = 2.7182... Note that π and e are termed “irrational” in that these numbers cannot be written as a ratio of two integers; their decimals go forever without repeating. For example, the name “Harry” … 5 letters … is encrypted as “ BXffm ” in Unicode. That is: 72 97 114 114 121 → (72+5)*(e/π) (97+5)*(e/π) (114+5)*(e/π) (114+5)*(e/π) (121+5)*(e/π) → 66 88 102 102 109 … rounded to the lower integers. → B X f f m … Unicode character equivalents of the integers. Use binary bit shift operations to affect the multiplication and division. Perform all of the math on bit representations of the numbers. Tasks With your name, using IEEE 754, do the multiplication and division in binary (show use of the bit shift operators <>> ), storing floating-point binary in each of the 32 bits for each character in the name. A register will be a 32-bit array. A floating point number is accommodated by those 32 bits, as with the example for the number 0d123.456 in our class notes. After each mathematical operation of the encryption, present the result in the IEEE 754 floating point standard. Try to fill in all places of the 32-bit register for each of the first five characters in your first name (and last name if you have a first name of less than five characters). Represent the encrypted name from part A in memory using byte addressing. Assume that Random Access Memory is available from address 0x20000000 to 0x3FFFFFF. Use all the bits of the 32-bit register for the IEEE 754. Show your work. Design a dedicated ALU that encrypts a single character as described above. Your ALU can be a drawn diagram or designed in Logisim. Depending on the design, it may entail a variety of components, not limited to a control unit or decoder, adders, a shifter, a shift register and a clock. There are ALU oriented schematics in chapter 5 of our textbook. Sections 2 through 4 are most relevant here. Alternatively, you may emulate the ALU in software, as an Assembly, C or Java routine. Using this option, make sure to employ the appropriate arithmetic shift operator for the respective programming language. Submit your drawing, program source code or your Logisim circ file. You may incorporate a Floating Point Unit (FPU) for extra credit. For example: https://developer.arm.com/documentation/ddi0439/b/Floating-Point-Unit Please complete the following task, as restated from page 525 in the Harris textbook. Consider a virtual memory system that can address a total of 232 bytes. You have unlimited hard disk space, but are limited to only 8 MB of semiconductor (physical) memory. Assume that virtual and physical pages are each 4 KB in size. How many bits is the physical address? What is the maximum number of virtual pages in the system? How many physical pages are in the system? How many bits are the virtual and physical page numbers? Suppose that you come up with a direct mapped scheme that maps virtual pages to physical pages. The mapping uses the least significant bits of the virtual page number to determine the physical page number. How many virtual pages are mapped to each physical page? Why is this “direct mapping” a bad plan? A more flexible and dynamic scheme for translating virtual addresses into physical addresses is required than the one described in the previous question. Suppose you use a page table to store mappings (translations from virtual page number to physical page number). How many page table entries will the page table contain? Assume that, in addition to the physical page number, each page table entry also contains some status information in the form of a valid bit (V) and a dirty bit (D). How many bytes long is each page table entry? (Round up to an integer number of bytes.) Scoring is equally weighted for tasks 1 through 4 above. For full credit show all of your work. 10% extra credit: A Floating Point Unit that works on the ARM CPU for task 3. FAQs Q: How do we do the encryption using the bit shifting operands <>> with e and pi? A: First convert everything to IEEE 754. Then do the shifts for the multiplication and then the division. For dealing with floats, one trick is to scale the mantissa's of both the numerator and denominator by an equal magnitude, multiplying by some magnitude of 10, decimal, to eliminate the floating point, such as 1000 x 123.456 / 1000 x 234.68 -> 123456 / 234680. Q: Is there an
Dec 07, 2021
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here