The other answers didn't really answer your question of how these Hex values are calculated/found. so here's my answer.
Thinking about this is much easier in Binary than HEX. as the 2bit left shift is important to understanding the concept
2bits is multiply by 4.
Which cannot be represented in HEX as nicely since easy Hex digit is 16 values.
but ill try to explain it still:
0x20000
1 Branch instructions use a 16 bit Immediate field. (5 bit RS, RT) (6 bit Opcode) == 32bits
(https://en.wikibooks.org/wiki/MIPS_Assembly/Instruction_Formats#I_Format)
those 16 bits are Signed. they can be positive & Negative.
That gives you an effective range of -(2^15) == -32768
to +(2^15 -1) == 32767
MIPS multiples any address inputs by 4. Forcing them to be word aligned.
so your Minimum value -(2^15)
Multiply by 4: -{2^15 *4} (4=2^2), {2^(15+2)} (15+2 == 17)
:
becomes -(2^17) == -131072
in Binary (signed 2's complement).
1000 0000 0000 0000 <<2 == 10 0000 0000 0000 00[00]
Converting that to Hex 10=2 (0000=0) gives 2 0 0 0 0 ==
0x20000
this would be sign extended before adding it to the (PC+4):
so for say, instruction #32770, PC=0x00420008 (PC+4)=0x0042 000C
0x0042000C - 0x20000 = 0x0040000C, instruction #3
(remember, offset is based off PC+4)
#32770+1 +-32768 == 3
0x1FFFC
Same for the Maximum value:
(2^15 -1)
Multiply by 4: {(2^15 -1) *4} (4=2^2), {2^(15+2) -(1*4)} (15+2 == 17)
:
becomes (2^17 -4) == 131068
0111 1111 1111 1111 <<2 == 01 1111 1111 1111 11[00]
Converting that to Hex 01=1 (1111=F) (1100=C) gives 1 F F F C ==
0x1FFFC
Note the address needs to be added to the current (Program Counter+4)
so for say, instruction #32770, PC=0x00420008 (PC+4)=0x0042000C
0x0042000C + 0x1FFFC= 0x440008, instruction #65538
(remember, offset is based off PC+4)
#32770+1 +32767 == 65538
0x0FFFFFFC
2 now Jumps use a 28 bit address.
Also Note, Jumps use an absolute address. not an offset.
maximum 28 bit value is (2^26 -1) == 67108863, 0x03FFFFFF
``
Shifted 2 (*4) becoming 28bits. {(2^26 -1) *4}, == {2^28 -4} ==
268435452, 0x0FFFFFFC
But then the missing four bits ? .. they come from the PC - which in the Memory stage, it has already been incremented to (PC+4)
for instruction #32770, PC=0x00420008 (PC+4)=0x0042000C
0x0042000C in binary is [0000] 0000 0100 0010 0000 0000 0000 1100
+0x0FFFFFFC in binary [####] 1111 1111 1111 1111 1111 1111 1100
it is only 28 (27:0) bits and missing the 31:28 bits.
Taking the bits from PC+4. we get:
0000 ---- ---- ---- ---- ---- ---- ---- (PC+4)
---- 1111 1111 1111 1111 1111 1111 1100 (Target-Address)
-----------------------------------------
0000 1111 1111 1111 1111 1111 1111 1100 (Jump-Address)
(which in this case is the same value as sign extending it)
A better explanation of how Addresses are calculated.
How to Calculate Jump Target Address and Branch Target Address?