
A serial port's address is a 
in four hexadecimal (base 16) digits. A hex digit can hold a value from 0 to 15 (decimal), and is made up of four binary bits given weights of eight, four, two, and one, hence the maximum value of 8+4+2+1 = 15.
A possible serial port address is 5240 hex. The example below shows how the hex digits are broken down into binary bits.
Binary bits  | 0  | 1  | 0  | 1  | 0  | 0  | 1  | 0  | 0  | 1  | 0  | 0  | 0  | 0  | 0  | 0  | 
Bit weight  | 8  | 4  | 2  | 1  | 8  | 4  | 2  | 1  | 8  | 4  | 2  | 1  | 8  | 4  | 2  | 1  | 
Sum of bits  | 0+4+0+1  | 0+0+2+0  | 0+4+0+0  | 0+0+0+0  | ||||||||||||
Hex digits  | 
  | 5  | 
  | 
  | 
  | 
  | 2  | 
  | 
  | 4  | 
  | 
  | 
  | 
  | 0  | 
  | 
These address bits are set by the switches.
All other bits are considered to be zero.
0 1 0 1 0 0 1 0 0 1 0 0 0 0 0 0
Figure 4 ---  Examination of a serial port base address
  | 
  | Switch on  | 
  | Switch off  | 
  | 
  | bit = 0  | 
  | bit = 1  | 
  | 
  | 
  | ||
  | 
  | 
  | 
  | 
  | 
Factory default setting  | 0300 hex | |||
Position 6 of SW2 is used to enable or disable the interrupt status register.
SW1
  | 
  | 
  | 
  | 
  | 
  | 
  | 
  | 
  | 
  | 
  | 
  | 
  | 
  | 
  | 
  | 
  | 
  | 
  | 
  | 
  | 
  | 
  | 
  | 
  | 
  | 
  | 
  | 
  | 
  | 
  | 
  | 
  | 
  | 
  | 
  | 
  | 
  | 
  | 
  | 
  | 
  | 
  | 1  | 
  | 2  | 3  | 4  | 5  | 6  | 
  | |||||
  | 
  | 
  | 
  | 
  | 
  | 
  | 
  | 
  | 
  | 
  | 
  | 
  | 
  | 
0  | 
  | 0  | 0  | 0  | 0  | 0  | 
  | ||||||
  | 
  | 
  | 
  | 
  | 0  | 
  | 
  | 
  | 
  | 
  | 
  | 
  | 
  | 
Another Example   | 5AC0 hex  | 
  | 
  | 
  | |||||||||
SW1
  | 
  | 
  | 
  | 
  | 
  | 
  | 
  | 
  | 
  | 
  | 
  | 
  | 
  | 
  | 
  | 
  | 
  | 
  | 
  | 
  | 
  | 
  | 
  | 
  | 
  | 
  | 
  | 
  | 
  | 
  | 
  | 
  | 
  | 
  | 
  | 
  | 
  | 
  | 
1  | 
  | 2  | 3  | 4  | 5  | 6  | 
  | |||||
  | 
  | 
  | 
  | 
  | 
  | 
  | 
  | 
  | 
  | 
  | 
  | 
  | 
0  | 
  | 4  | 0  | 1  | 8  | 0  | 
  | |||||
  | 
  | 
  | 
  | 5  | 
  | 
  | 
  | 
  | 
  | 
  | 
  | 
  | 
SW2
  | 
  | ON  | 
  | 
  | 
  | 
  | 
  | 
  | 
  | 
  | 
  | 
  | |
  | 
  | 
  | 
  | 
  | 
  | 
  | 
  | 
  | 
  | 
  | 
  | 
  | 
  | 
  | 
  | 
  | 
  | 
  | 
  | 
  | 
  | 
  | 
  | 
  | 
  | 
  | 
  | 
  | 
  | 
  | 
  | 
  | 
  | 
  | 
  | 
  | 
  | 
  | 
  | 
  | 
  | 
  | 1  | 
  | 2  | 
  | 3  | 4  | 5  | 6  | 
  | ||||
  | 
  | 
  | 
  | 
  | 
  | 
  | 
  | 
  | 
  | 
  | 
  | 
  | 
  | 
2  | 
  | 1  | 
  | 0  | 0  | 
  | (no digits)  | ||||||
3  | 
  | 
  | 
  | 
  | 
  | 
  | 0  | 
  | 
  | 0  | 
  | ||
  | SW2  | 
  | 
  | 
  | 
  | 
  | 
  | 
  | 
  | 
  | 
  | ||
  | 
  | 
  | 
  | 
  | 
  | 
  | 
  | 
  | 
  | 
  | 
  | 
  | |
  | 
  | ON  | 
  | 
  | 
  | 
  | 
  | 
  | 
  | 
  | 
  | 
  | |
  | 
  | 
  | 
  | 
  | 
  | 
  | 
  | 
  | 
  | 
  | 
  | 
  | |
  | 
  | 
  | 
  | 
  | 
  | 
  | 
  | 
  | 
  | 
  | 
  | 
  | 
  | 
  | 
  | 
  | 
  | 
  | 
  | 
  | 
  | 
  | 
  | 
  | 
  | 
  | 
  | 
  | 1  | 
  | 2  | 
  | 3  | 4  | 5  | 6  | 
  | ||||
  | 
  | 
  | 
  | 
  | 
  | 
  | 
  | 
  | 
  | 
  | 
  | ||
2  | 
  | 0  | 
  | 8  | 4  | 
  | (no digits)  | ||||||
A  | 
  | 
  | 
  | 
  | C  | 
  | 
  | 0  | 
  | 
  | |||
Figure 5 ---  Serial port base I/O address selection switches
Quatech   | 5  |