
Diamond D. answered 10/16/22
Google Intern x2, Go Programmer, Linux Enthusiast
I'll keep the answer to the first part short, because there are way too many instruction sets to answer this question in a reasonable matter, in my opinion. Many conventional CPU instruction sets would, of course, have the basic commands that a regular CPU have such as add/sub/mul (things that an Arithmetic Logic Unit often do) as well as move/copy, compare, jump, etc.
To answer the second question, yes, you can theoretically "map each instruction to its specific binary and create a multi-platform compiler," and there has been multiple attempts at this.
If you've ever written C code or in any language not Assembly, you've written exactly that! Most C code can be trivially compiled by various compilers (gcc, clang, etc.) to various different CPU architectures such as x86, ARM, RISC-V, etc. The idea of a higher-level language is partly to abstract away the CPU instructions so that the developer doesn't have to care.
Think of programming abstractions like an onion: the outer-most layer is the higher-level programming languages that you get, like JS, Python, etc. Then, as you go further down, you start to encounter lower-level abstractions: JS code has to be interpreted by another program (probably one in C++), which means the program has to be compiled from C++ (to LLVM IR if you're using clang) to machine code, which then gets executed by the CPU through its own various layers of hardware.
Another popular thing that you might've heard of is that we can actually emulate one CPU instruction set in another. The most common tool for this is QEMU. For example, if you have an Intel/AMD computer (x86 ISA), you can easily emulate an ARM computer within it by invoking a single QEMU command. The performance will probably be very subpar, as the computer would have to translate or map every single ARM instruction to x86 ones, which is a lot of extra work compared to native.