Section 7. (a) Except as hereinafter provided in this Section, the gain derived from the sale, exchange or other disposition of property, real or personal, shall be the excess of the amount realized therefrom over the basis determined in accordance with the provisions of this Section, and the loss sustained shall be the excess of such basis over the amount realized.