smallest number: 1.000 0000 0000 0000 0000 0001 * 2-127
smallest number: 000 0000 0000 00002 or 010 largest number: 111 1111 1111 11112 or 3276710
- 472.84210 = - 111011000.1101012 = - 1.110110001101012 * 28 IEEE format: 1 1000 0111 110 1100 0110 1010 0000 0000
0.0458510 = 0.000010112 = 1.0112 * 2-5 IEEE format: 0 0111 1010 011 0000 0000 0000 0000 0000
0 1000 1000 010 0110 1001 1100 0000 0000 = 1.01001101001112 * 29 = 1010011010.01112 = (2 + 8 + 16 + 128 + 512 + .25 + .125 + .0625)10 = 666.437510
1 0111 1011 011 0000 0000 0000 0000 0000 = - 1.0112 * 2-4 = - 0.00010112 = - (.0625 + .015625 + .0078125)10 = - .085937510
check bits: C1 0 C2 1 C4 0 C8 0 stored word: 1010 0100 0110
fetched word: 1101 0011 1011 fetched check bits: C1 = 1 C2 = 1 C4 = 1 C8 = 0 recalculated check bits: C1 = 1 C2 = 0 C4 = 1 C8 = 1 syndrome: 1010 error in d6, position 1010
fetched word: 0110 1111 1110 fetched check bits: C1 = 0 C2 = 1 C4 = 1 C8 = 1 recalculated check bits: C1 = 0 C2 = 1 C4 = 1 C8 = 0 syndrome: 1000 error in c8, position 1000
sub.s $f4, $f4, $f4 # $f4 = 0 to use in check for loop end sub.s $f5, $f5, $f5 # $f5 = 0 to initialize sum loop: la $a0, prompt # prepare to print prompt li $v0, 4 syscall # print prompt li $v0, 6 # prepare to read float syscall # read float c.eq.s $f0, $f4 # if user entered 0 bc1t loopend # exit loop add.s $f5, $f5, $f0 # add num to sum b loop # back to top of loop loopend: la $a0, maxmsg # prepare to print sum msg li $v0, 4 syscall # print sum msg mov.s $f12, $f2 # prepare to print sum li $v0, 2 syscall # print sum li $v0, 10 syscall # exit from program
Email Me |
Office Hours |
My Home Page |
Department Home |
MCC Home Page
© Copyright Emmi Schatz 2023