Identifying source and drain terminals for MOSFET circuit