How do I calculate the base address of a device in a computer(AT/XT). I know it has to do with the CPU's address lines.

I have heard that the address lines strobe as follows:
A0 A1 A2 A3...
0 0 0 0
1 0 0 0
0 1 0 0
1 1 0 0
0 0 1 0
1 0 1 0
0 1 1 0
1 1 1 0
0 0 0 1
... and so on with Address line A31(32-bit CPU), or A63(64-bit CPU) strobing last. I understand that this is how a CPU detects devices on its bus.



I believe that finding a base address is as follows:
A0 A1 A2 A3... Address line numbers
1 2 4 8 Value???

0 1 1 0 Example: 1 means a device is connected here

This would mean that the device is at Base Address 6h(hex).

Please let me know if this is right. If this is wrong, please post the correct way to find the Base I/O Address.