tuesday 22 september 2015
play

Tuesday, 22 September 2015 Upcoming talk: Harnessing Bioinformatics - PowerPoint PPT Presentation

Tuesday, 22 September 2015 Upcoming talk: Harnessing Bioinformatics September 24 at 4:30 p.m. in Steffee B10 Questions about lab? Department coffee/tea TODAY at 2! Today: more on binary, hexadecimal, MIPS Hexadecimal Base 16: 16 characters


  1. Tuesday, 22 September 2015 Upcoming talk: Harnessing Bioinformatics September 24 at 4:30 p.m. in Steffee B10 Questions about lab? Department coffee/tea TODAY at 2! Today: more on binary, hexadecimal, MIPS

  2. Hexadecimal Base 16: 16 characters used: 0, 1, 2, …, 9, A, B, C, D, E, F (for base 10 values 0, 1, …, 9, 10, 11, 12, 13, 14, 15) Example : 1AE3 hex 1x16 3 + 10x16 2 + 14x16 1 + 3x16 0 = 4096 + 2560 + 224 + 3 = 6883 dec Memorize the first 16 binary representations: 0000 = 0, 0001 = 1, …, 1001 = 9, 1010 = A, 1011 = B, 1100 = C, 1101 = D, 1110 = E, 1111 = F

  3. Hexadecimal Memorize : For a signed (32-bit) integer, FFFFFFFF hex = -1 dec For a signed (32-bit) integer, 8FFFFFFF hex = 2147483647 dec In MARS, we can enter constants as either decimal or hex. For hex, use the prefix “ 0x ”. Example: li $t0,0x1ae3 # loads hexadecimal 1ae3

  4. Back to MIPS Instructions Last time: R-format instructions: op rs rt rd shamt funct 6 bits 5 bits 5 bits 5 bits 5 bits 6 bits opcode is 000000 for all R-type instructions Example: add $t2,$zero, $t3 000000 00000 01011 01010 00000 100000 This means “add” $zero $t3 $t2

  5. Back to MIPS Instructions op rs rt rd shamt funct 6 bits 5 bits 5 bits 5 bits 5 bits 6 bits Example: sub $t0,$v0,$a2 000000 00010 00110 01000 00000 100010 $v0 $a2 $t0 different from add

  6. Back to MIPS Instructions “AND” -- take the “and” of each pair of bits in the same position: $t0 = 0000 1001 1000 0011 1111 1000 0101 1111 (= 159643743) $t1 = 0000 0111 0100 0011 1011 0010 0110 1001 (= 121877097) and $t2,$t0,$t1 gives $t2 = 0000 0001 0000 0011 1011 0000 0100 1001 (= 17018953)

  7. Back to MIPS Instructions “OR” -- take the “or” of each pair of bits in the same position: $t0 = 0000 1001 1000 0011 1111 1000 0101 1111 (= 159643743) $t1 = 0000 0111 0100 0011 1011 0010 0110 1001 (= 121877097) or $t2,$t0,$t1 gives $t2 = 0000 1111 1100 0011 1111 1010 0111 1111 (= 264501887)

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend