MIPS
Transfer to MIPS
if (j < 0x80) {
// j fits in 7 bits, expand to 8 bits
// n = j
} else if (j <= 0x7FF) {
// j fits in 11 bits, expand to 16 bits
// b = low 6 bits of j
// a = next 5 bits of j
// n = 110 a 10 b
// 5 6 bits in
// j = aaaaa bbbbbb
// 3 5 2 6 bits out
// n = 110 aaaaa 10 bbbbbb
} else if (j <= 0xFFFF) {
// j fits in 16 bits, expand to 24 bits
// c = low 6 bits of j
// b = next 6 bits of j
// a = next 4 bits of j
// n = 1110 a 10 b 10 c
// 4 6 6 bits in
// j = aaaa bbbbbb cccccc
// 4 4 2 6 2 6 bits out
// n = 1110 aaaa 10 bbbbbb 10 cccccc
} else if (j <= 0x10FFFF) {
// j fits in 21 bits, expand to 32 bits
// d = low 6 bits of j
// c = next 6 bits of j
// b = next 6 bits of j
// a = next 3 bits of j
// n = 11110 a 10 b 10 c 10 d
// 3 6 6 6 bits in
// j = aaa bbbbbb cccccc dddddd
// 5 3 2 6 2 6 2 6 bits out
// n = 11110 aaa 10 bbbbbb 10 cccccc 10 dddddd
} else {
// j is outside the UTF-8 range of character codes
// n = 0xFFFFFFFF
}
See more in attatchment
9 years ago 20
- Assignment 2: Network Design Due Week 10 and worth 110 points Imagine that you have been hired as a contractor by a local business that has recently purchased new office space for its growing business. Design a network for the local business based on th
- Create an Innovation
- homework
- 100A Discussion: Mood Disorders and Life Stages
- "AllRoundBest Tutor" The Chicago Outfit
- Assessing the crisis
- cases responses
- Assignment
- Assignment 2
- Paper rewrite gas station