Solc-JS isn't showing you all of the possible outputs of the Solidity compiler.
If instead you install Solc directly and you run:
solc --combined-json bin,opcodes,srcmap basic.sol
You will get an output similar to Remix:
"opcodes": "PUSH1 0x60 PUSH1 0x40 MSTORE CALLVALUE ISZERO PUSH1 0xE JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x84 DUP1 PUSH2 0x1C PUSH1 0x0 CODECOPY PUSH1 0x0 RETURN STOP PUSH1 0x60 PUSH1 0x40 MSTORE PUSH1 0x4 CALLDATASIZE LT PUSH1 0x3F JUMPI PUSH1 0x0 CALLDATALOAD PUSH29 0x100000000000000000000000000000000000000000000000000000000 SWAP1 DIV PUSH4 0xFFFFFFFF AND DUP1 PUSH4 0x448F30A3 EQ PUSH1 0x44 JUMPI JUMPDEST PUSH1 0x0 DUP1 REVERT JUMPDEST CALLVALUE ISZERO PUSH1 0x4E JUMPI PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH1 0x54 PUSH1 0x56 JUMP JUMPDEST STOP JUMPDEST JUMP STOP LOG1 PUSH6 0x627A7A723058 KECCAK256 0xd9 PUSH16 0x7BCE11153F261332A16E2FF0D97FA631 OR MUL SWAP16 0x5d DUP10 0xbc SHL 0xd3 CALLDATACOPY LOG4 JUMPDEST 0xf6 0xc7 0xdc STOP 0x29 ",
bin is compiled binary of the contract, same as the
--bin output from
solcjs. There may be some differences based on the compiler version, compiler settings, and contract metadata, but otherwise you should get an exact match.
The binary can also be represented by a more "human readable" set of instructions which is called the
bin and the
opcode contain the exact same data, just parsed in two different ways.
I am less familiar with the Source Mappings (
srcmap), but it looks like it is mostly used for analysis and debugging purposes.
Ultimately, when you deploy a contract, only the
bin is used. The other outputs from Remix are made available for convenience, but do not actually represent anything happening on the blockchain.