In general, bytes in memory (primary storage, RAM) are measured in base 2 (KiB, MiB, GiB, etc), while other measurements of bits and bytes tend to be in base 10:
You particular O/S may choose to shorthand file sizes using base 2 reduction, but only because programmers put too much emphasis on efficiency; it's faster to bit shift by 10 than divide by 1000.
Reads and writes on ATA (IDE) drives are done with a 512-byte buffer. I believe the same goes for SCSI.
Sectors are a filesystem concept.
In general, bytes in memory (primary storage, RAM) are measured in base 2 (KiB, MiB, GiB, etc), while other measurements of bits and bytes tend to be in base 10:
hard drive capacity (40 GB = 40 * 10^12 bytes)
transmission speeds (100 Mbps = 100 10^6 bits / s)
You particular O/S may choose to shorthand file sizes using base 2 reduction, but only because programmers put too much emphasis on efficiency; it's faster to bit shift by 10 than divide by 1000.
Actually, IP doesn't have port numbers. Port numbers are at the TCP and UDP level.