I understand that there are many versions of the assembly programming language, such as x86, ARM, MIPS, Motorola, etc... which run on various architectures. However, why is this? How does assembly work? Why is it that I can't use one version of assembly on a different architecture. On the simplest level, surely we're just dealing with the flow of electric current, so why is there this kind of restriction, and how do these architectures even differ?
Furthermore, let's say I wanted to make an operating system that run on a custom architecture - one that I made. Would I then have to create my own assembly language? And is assembly language required anyway for creating an OS?