Homework on EVM

1. What does the EVM do?
Read and execute smart contract instructions.

2. What is the format of the instructions that the EVM can read?
Bytecode

3. What is the relationship between the programming language Solidity and Bytecode?
Solidity use a compiler that translate its language into bytecode which the EVM can read.

4. Why can’t Bitcoin run the same type of complex programs like Ethereum can?
It’s not turing complete.

5. What is a Turing Complete programming language?
It’s a type of language that allows to create complex tasks.

1 Like
  1. What does the EVM do?
    Basically, the EVM looks at the instructions contained within a smart contract, performs all calculations, then tells a CPU to execute said instructions.

  2. What is the format of the instructions that the EVM can read?
    The EVM reads and helps execute Ethereum bytecode which is typically derived from the Solidity programming language and a compiler.

  3. What is the relationship between the programming language Solidity and Bytecode?
    As stated above, bytecode is a low level representation of smart contracts typically written in Solidity.

  4. Why can’t Bitcoin run the same type of complex programs like Ethereum can?
    Because the Bitcoin Script is not a turing complete programming language; making it limited in it’s functionality.

  5. What is a Turing Complete programming language?
    A turing complete programming language is one that is universally accepted among any computer to use in solving any problem over time while building an application.

2 Likes
  1. The EVM reads and executes Smart Contracts via a nodes CPU.

  2. The EVM can read instructions in EVM Bytecode.

  3. Smart Contracts can be written in Solidity. This information gets translated in EVM Bytecode, that the EVM can read.

  4. The programming language that is used in Bitcoin is Script. This language is is very limited. It is not Turing Complete.

  5. A Turing Complete programming language that is universally programmable.

2 Likes
  1. an evm is an etherium virtual machine that makes sure that the nodes in the networkaccept and verify the transactions in the network.
    2.the evm reads solidity and compiles it into byte code which is executed by the cpu
    3.solidity and bytecode have a symbiotic relationship
    4.bitcoin is non touring complete
    5 touring complete language has loops
1 Like
  1. The EVM will read byte code programmed in Solidity and execute the smart contract. It also add a level of security in that it ensures no malicious code will be propagated through the blockchain.

  2. The EVM will read byte code that is programmed and compiled in Solidity.

  3. The relationship between Solidity and byte code is that Solidity will compile commands and turn them into byte code which is sent to the CPU.

  4. Bitcoin cannot run complex programs like Ethereum because its code base (Script) is too primitive and is not Turing Complete.

  5. A Turing complete programming language is a programming language that can be programmed to do whatever you need it to do. Therefore it is more flexible for the programmer.

1 Like

Homework on EVM - Questions (Updated on Dec 3 2019)

What does the EVM do?

  1. The EVM (Ethereum Virtual Machine) makes it possible to execute smart contracts on the Ethereum Network. Just like any program that is written in code, a normal computer would use it’s CPU to run the programme. Smart contract is also a programme code, written in solidity and the EVM can read the smart contract and execute the code. Now all the EVM on the network would read the smart contract it would then tell the CPU’s to do the task and they all would have to come with the same results to come to consensus on the network.

What is the format of the instructions that the EVM can read?

  1. The EVM format instructions written on the smart contract is written in solidity. This program language is then complied into Byte Code in order for the EVM to read.

What is the relationship between the programming language Solidity and Bytecode?

  1. In regards for relationship between Solidity and Byte Code is not so important. EVM can only read Byte Code and solidity Language is complied into Byte Code. Solidity was created to make it easier for developers to be able to write smart contracts on the Ethereum Network. But the EVM can only read the smart contract as Byte Code. Ethereum smart contracts will be able to be written in other programmable languages but it will still be complied into Byte Code for the EVM to read. So the relationship to other Languages is not so essential sense Byte Code is what matters most.

Why can’t Bitcoin run the same type of complex programs like Ethereum can?
&
What is a Turing Complete programming language?

4/5. Bitcoin already has a programmable language which is Script. Now you could have some small Smart contract functions run on bitcoin but not complex tasks. This is because the Programmes language is not Turing Complete. What is meant by the term Turing Complete is that a Programmes language should be in theory able to handle any task that is requested to be completed. With Script language complex tasks on bitcoin would not be possible. Also programmes language that has Turing Complete language can not only handle complex tasks, but for a developers it has a Function that’s called loops Function. This allows a programmer to tell software to do something 1000x times. If you don’t have loops programme, well you might have to write out code 1000x of times and would be a slow process. Bitcoin did not want this function do to potential spam on the network due to have a Turing Complete language.

1 Like
  1. An EVM executes smart contracts.

  2. The instructions are written in Solidity.

  3. Solidity is compiled into Bytecode before being sent to the CPU.

  4. Bitcoin can’t run the same type of complex programs because it can’t execute complex smart contracts. It does have a scripting language but it is very limited, it is not Turing Complete.

  5. A Turing Complete programming language is one that can run anything that you can write and in particular lets you do things like if statements and loops.

1 Like
  1. can read & execute smart contract
  2. byte code
  3. solidity = language used in ethereum wich compiles into bytecode in order for EVM to be able to read & execute
  4. Bitcoin language / script is not Turing Complete
  5. Solidity & Vyper
2 Likes

Excellent answer sir! really well documented! keep it like that please! :muscle:

Carlos Z.

1 Like
  1. What does the EVM do?
    Executes script in a smart contract.

  2. What is the format of the instructions that the EVM can read?
    It reads Bytecode

  3. What is the relationship between the programming language Solidity and Bytecode?
    Solidity transfers the code written into Bytecode so the EVM can read.

  4. Why can’t Bitcoin run the same type of complex programs like Ethereum can?
    BTC Program language is Not Turing Complete.

  5. What is a Turing Complete programming language?
    It is a language that allows editing/adaption to any further programs/updates.

2 Likes

Excellent answer sir! really well documented! keep it like that please! :muscle:

Carlos Z.

1 Like

Thank you very much buddy. :love_you_gesture: i am so motived to learn everything in this space.

2 Likes

Great detailed answers bro. :facepunch::love_you_gesture:

3 Likes
  1. What does the EVM do?
    EVM is Ethereum virtual machine, smart contracts like Solidity are compiled to low-level opcodes, which is read by EVM to execute specific tasks.

  2. What is the format of the instructions that the EVM can read?
    Opcodes.

  3. What is the relationship between the programming language Solidity and Bytecode?
    The programing language Solidity are compiled to low-level machine instructions, opcodes. In order to efficiently store opcodes, they are encoded to bytecode. Every opcode is allocated a byte.

  4. Why can’t Bitcoin run the same type of complex programs like Ethereum can?
    Bitcoin is using the scripting language which is not turning complete language; while Ethereum is using
    Solidity which is turning complete language, which means Ethereum is able to perform looping and branching statements for complex programs.

  5. What is a Turing Complete programming language?
    A Turing Complete programming language is the programming language can be used to simulate any Turing machine, this means that this language is able to recognize or decide other data-manipulation rule sets.

1 Like

Thank you Carlos! i appreciate it! :snake::metal:

2 Likes
  1. What does the EVM do?
    EVM execute the smart contract on Ethereum
  2. What is the format of the instructions that the EVM can read?
    Bytecode
  3. What is the relationship between the programming language Solidity and Bytecode?
    The smart contract was written in Solidity and compiled into Bytecode to be executed by EVM
  4. Why can’t Bitcoin run the same type of complex programs like Ethereum can?
    The programming language of Bitcoin is Script which is not Turing complete and can not do loop type of action.
  5. What is a Turing Complete programming language?
    A Touring complete language can perform loop type of repeating task and just about anything can be done by computer.
1 Like

1-What does the EVM do?
EVM is a virtual machine that executes the smart contract instructions instead of the real CPU (computer of the user). It’s safer since it’s part of the network and if someone can access the real CPU it would be a big problem.

2-What is the format of the instructions that the EVM can read?
EVM can read Byte Code. It’s the result of compiling Solidity or Vyper languages.

3-What is the relationship between the programming language Solidity and Bytecode?
Solidity is the programming language and, once it’s compiled, the result is Bytecode, a syntax ready to be read by EVM.

4-Why can’t Bitcoin run the same type of complex programs like Ethereum can?
Because Script (Bitcoin language) is not Turing Complete, what means that not every problem is solved, just simple ones.

5-What is a Turing Complete programming language?
A turing complete programming language can solve any problem. It is, any program you need, you can do.

1 Like
  1. The EVM reads the smart contract and converts it to bytecode so that the computers CPU carries out the instructions of the smart contract.

  2. Javascript/Solidity

3.Bytecode are the instructions written in Solidity that tell the CPU what to do.

  1. Bitcoin is limited in block size and also it’s is intended purpose is for a store value.

  2. Turing complete allows for a limitless ability to program what you want on the blockchain through the use of loops.

1 Like
  1. What does the EVM do?

It reads the Bytecode that was compiled from Solidity or Vyper and directs the CPUs of the nodes in the ethereum network to process the Bytecode.

This way, the Ethereum network facilitates programmability and speed (as the input languages are easy to learn by comparison while Bytecode is optimized for computers) and this division also serves as an important security function, protecting the nodes from being hacked or taken over from outside, for example. (Such attacks would be much more likely if the code would directly control the nodes’ CPUs, without being filtered by the EVM.)

  1. What is the format of the instructions that the EVM can read?

It can read Bytecode (which in June 2020 is mostly compiled from Solidity, while people also start to use the newer language Vyper). Theoretically other (“human centered”) programming languages would be possible to connect to the EVM (via translating / compiling them to Bytecode, which the EVM will then read).

  1. What is the relationship between the programming language Solidity and Bytecode?

Solidity is the human input programming language (same goes for Vyper), Bytecode is the code that is compiled from this, for machine use. You could say Solidity is for humans (easier to understand, read, and interact with for humans) and Bytecode for machines (difficult for humans to read, write, etc).

  1. Why can’t Bitcoin run the same type of complex programs like Ethereum can?

It was a conscious decision of the Bitcoin network to let Bitcoin exist as a network with very little programmable functions, so that it can be smaller (in terms of amount of code in the network) and quicker, than what it would be with smart contracts. Bitcoin is in that sense rather “digital gold” while Ethereum is built to be a “decentralized world wide computer”. Also, Bitcoin is in this way safeguarded against many forms of attacks that would try to slow down, freeze or otherwise disable the network or it’s nodes. In this way, the missing programmability is also an important security feature.

  1. What is a Turing Complete programming language?

A language that allows to basically program anything. Such a programming language is considered “complete” in terms of functions, while non-Turing-complete languages are considered to be slimmed down versions that are not complete and lack important programming functions. In Bitcoin’s and Ethereum’s case for example, you cannot program loops with Bitcoin’s programming language Script, which makes it non-Turing-complete (while you can program these and many more things in Ethereum’s Solidity, which is considered Turing-complete).

1 Like

-EVM its a virtual machine that executes code
-evm reads byte code
-solidity is the language to generate Bytecode
-bitcoin uses script and its meant to keep it simple and small in bytes.
-turning complete language can create loop and other functions.

1 Like