rperry - segmentation - seed = 12345
ARG address space size 2048
ARG phys mem size 32768

Segment register information:

  Segment 0 base  (grows positive) : 27040
  Segment 0 limit                  : 725

  Segment 1 base  (grows negative) : 10302
  Segment 1 limit                  : 517

All values are in decimal

For each virtual address, either write down the physical address it translates to
OR write down that it is an out-of-bounds address (a segmentation violation). For
this problem, you should assume a simple address space with two segments: the top
bit of the virtual address can thus be used to check whether the virtual address
is in segment 0 (topbit=0) or segment 1 (topbit=1). Note that the base/limit pairs
given to you grow in different directions, depending on the segment, i.e., segment 0
grows in the positive direction, whereas segment 1 in the negative. 

Use 0 for PA to indicate a segmentation violation.

Segment register information:

  Segment 0 base  (grows positive) : 0x000069a0 (decimal 27040)
  Segment 0 limit                  : 725

  Segment 1 base  (grows negative) : 0x0000283e (decimal 10302)
  Segment 1 limit                  : 517

Virtual Address Trace
  VA  0: 0x000002f3 (decimal:  755) --> SEGMENTATION VIOLATION (SEG0)
  VA  1: 0x0000018d (decimal:  397) --> VALID in SEG0: 0x00006b2d (decimal: 27437)
  VA  2: 0x00000487 (decimal: 1159) --> SEGMENTATION VIOLATION (SEG1)
  VA  3: 0x0000014b (decimal:  331) --> VALID in SEG0: 0x00006aeb (decimal: 27371)
  VA  4: 0x000000ff (decimal:  255) --> VALID in SEG0: 0x00006a9f (decimal: 27295)
  VA  5: 0x00000377 (decimal:  887) --> SEGMENTATION VIOLATION (SEG0)
  VA  6: 0x0000047f (decimal: 1151) --> SEGMENTATION VIOLATION (SEG1)
  VA  7: 0x00000165 (decimal:  357) --> VALID in SEG0: 0x00006b05 (decimal: 27397)

highest VA seg0 = 724
 lowest VA seg1 = 1531
  #   VAPA
0   755
1   397
2   1159
3   331
4   255
5   887
6   1151
7   357

Highest legal virtual address in segment 0:

Lowest legal virtual address in segment 1: