Homework on EVM

  1. What does the EVM do?
  • The Ethereum Virtual Machine (EVM) executes byte code within the Smart Contract and gives commands to the CPU to perform.
  1. What is the format of the instructions that the EVM can read?
  • Byte Code
  1. What is the relationship between the programming language Solidity and Bytecode?
  • Solidity is the programming language used to write the Byte Code so it is readable by the EVM on the blockchain.
  1. Why can’t Bitcoin run the same type of complex programs like Ethereum can?
  • Bitcoin is written in Script which is not Turing Complete like Ethereum and can only perform basic functions of send and receive TX’s
  1. What is a Turing Complete programming language?
  • Turing Complete means you can program anything you can think of albeit its limitations with Scalability, such as Smart Contracts on the Blockchain. This also allows for the functionality of Loops where a series of instructions can be performed many times over repeatedly without having to write each individual instruction say for example 1000x. In short TC has more programmability.
1 Like

1 - Is a 256-bit Turing virtual machine. EVM is part of the Ethereum Protocol. It allows the execution of programs or smart contracts in order to deploy a series of added functionalities on said Blockchain so that users can use them. It is capable of executing a wide range of instructions that allow it great flexibility when carrying out different operations.
A specialized high-level language called Solidity was created for EVM programming. It is through this programming language that the creation of smart contracts is facilitated

2- EVM reads Byte code

3- Solidity transforms the operation codes (OP_CODES) from there to a Byte-Code that is executed by the EVM to perform the operations in a smart contract.

4- Like solidity, BTC has Scripts, but this is not a complete touring language and it does not allow loops so it is not effective for developing complex tasks and smart contract.

5- Complete Turing is understood to be that language that has a computational power equivalent to what is called the Universal Turing Machine. In other words, Alan Turing devised a system that could theoretically perform any type of calculation if unlimited physical resources were available. Applied this concept to Blockchain technology and fundamentally to smart contracts, it refers to the ability of a language with this characteristic to be able to be applied to solve any computational problem and implement complex structures such as loops.

1 Like
  1. What does the EVM do?
    The EVM is sort of like a programming language translator, acting as a barrier between the network and the computers that are nodes on the network. The EVM will read the smart contracts instructions and then it will tell the computer what to do.

  2. What is the format of the instructions that the EVM can read?
    The EVM reads ByteCode

  3. What is the relationship between the programming language Solidity and Bytecode?
    A compiler will take the instructions written in solidity and translate them into bytecode.

  4. Why can’t Bitcoin run the same type of complex programs like Ethereum can?
    Bitcoin is Non-Turing complete, meaning that it has very limited program-ability.

  5. What is a Turing Complete programming language?
    Solidity is a Turing complete programming language, A Turing Complete programming languages have loops and you can program anything you want.

1 Like
  1. EVM stands for Ethereum Virtual Machine, that executes byte code from smart contracts in an environment on top of the CPU.

  2. The EVM runs in a sandbox environment meaning it can’t directly excute smart contract code on the CPU.

*EDIT: the format of the instructions that the evm can read is ByteCode.

  1. Solidity is a programming language that looks like english and then gets compiled to byte code.

  2. The script language of Bitcoin is not Turing Complete, this limits the functionalities of the program.

  3. With a Turing Complete programming language you can program anything you want, theoretically. It is not limited to a set of commands/methods.

An EVM or Ethereum Virtual Machine is a code ran by all the nodes which can read and execute small contracts. They read the small contract and in base of the result, they gave orders to the CPUs. This is done to isolate (encapsulates) small contracts to avoid the possibility that a corrupt small contract takes control of the CPU.

EVM reads ByteCode.

Small contracts are written in Solidity lenguage, but then they are compiled and translated into ByteCode. EMV read instruction from ByteCode version.

Bitcoin can’t run complex programs because it was written in Script, which is not Turing complete. It means that it can’t resolve all the problems it may have to solve, for example, it doesn’t have loops to make iterations.

With a Turing complete programming language you can resolve all the problems you may have to resolve, it has loops to do iterations.

1 Like
  1. EVM read and execute instructions of the smart-contract.

  2. byte code

  3. Solidity is a high-level language for implementing smart contract, it is then compiled to bytecode so the EVM can execute the byte code instructions.

4.-bitcoin just need to be digital money, you just need simple transactions, since you have a limited size per block you don’t want to overload the bitcoin blockchain with smart contract.

  1. it’s a language that is no limited, you can program anything you want to resolve any problem.
    it has a loop feature to do iteration.
1 Like
  1. The Ethereum Virtual Machine (EVM) executes the Ethereum Bytecode in a decentralized fashion on the Ethereum network. Such smart contracts have access to the full capabilities of Ethereum and can control Ethereum and other tokens based on the Ethereum blockchain.

  2. The EVM can only execute Ethereum Bytecode and that Byte-code can be generated by multiple compilers/transpilers and other language systems.

  3. Solidity, the official language of Ethereum once approved and audited is then compiled to Bytecode to be run on the EVM by software execution tools.

  4. Bitcoin has an execution environment with the Script language, but primarily because of limitations of that language such as looping and in particular endless loops, Script is not considered Turing-Complete, which is a standard applied to computer languages indicating their lack of universal applicability.

  5. A language is said to be Turing-Complete or Turing-Powerful if it can represent ANY Turning machine. Most instruction sets or programming languages are Turing-complete. What is required is conditional branching, The lowly IF statement, and oddly … infinite loops.

1 Like

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

Quite close sir(s), but the format of the instructions that EVM read is ByteCode.

If you have any more questions, please let us know so we can help you! :slight_smile:

Carlos Z.

1 Like

5.What is a Turing Complete programming language?

Quite right sir, but could you please describe it in general terms?

If you have any more questions, please let us know so we can help you! :slight_smile:

Carlos Z.

  1. What does the EVM do?
  • In addition to POW (before Eth 2.0) Ethereum adds an EVM to the network to execute code
  • EVM is an application/piece of code that runs on all Ethereum nodes.
  • EVM can also read and execute SMs.
  • The EVM will interpret what needs to be executed and then tell the CPU what to do in order to reach a result.
  • All EVM/nodes need to execute all code (eg all SCs) to reach consensus.
  • EVM ensures security as it forces network participants to execute code using the EVM only a supposed to executing directly on the CPU.
  1. What is the format of the instructions that the EVM can read?
  • Bytecode
  1. What is the relationship between the programming language Solidity and Bytecode?
  • Solidity is an easy to understand language and is compiled into Bytecode
  1. Why can’t Bitcoin run the same type of complex programs like Ethereum can?
  • Bitcoin scripting is not Turing Complete. I.e. It does not understand loops. This was done on purpose so that the bitcoin network could not be spammed using looping code.
  1. What is a Turing Complete programming language?
  • You can execute anything you want with the only limitation being resources/cost.
1 Like
  1. EVM(Ethereum Virtual Machine) reads the smart contract in byte code and tells the cpu what to do. Its also security that prevents a smart contract from taking over the network.
  2. Process the bytecode that’s in the smart contract.
  3. Solidity is a human-readable language that gets compiled into byte code which then executes the smart contract’s text.
  4. Because of its scripting language. Bitcoin runs script there are limitations, ETH runs solidity which is a no boundary code.
    5.It means that there are no limits to what you can code.
1 Like

The evm is the Ethereum virtual machine. This executes the codes for smart contracts.
EVM can read the compiled solidity code. This is called bytecode.
Solidity is easy to read human language and it is compiled into bytecode to be read by the EVM
Bitcoin is not Turin complete so it cannot run smart contracts…
When something is Turin complete it means there are no limits to what you can code.

1 Like
  1. EVM converts the smart contract, say in Solidity… into Byte Code in a sandbox to keep host computers safe as well
  2. Solidity, and now Viper and can do loops
  3. The relationship between Solidity and Bytecode is the EVM.
  4. Bitcoin network can’t run smart contracts because of the fear if spamming, clogging the network,
    5 Turing Complete language would be Solidity
  1. EVM is virtual stack of code that is isolated from the network, filesystem or processes of the host computer in order to provide a trustless ecosystem. It prevents anyone from taking over the host computer and do malicious acts.

  2. EVM can read C++, Java, JavaScript, Python, Ruby, and many others.

  3. Solidity is a programming language that machines doesn’t understand where as Bytecode is a language that only the EVM can understand.

  4. Bitcoin cannot run the same type of complex programs like Ethereum necause it cannot do smart contracts.

  5. Turing Complete programming language is being a to compute anything using that language.

An EMV executes instructions between a nodes CPU and a smart contract.
Byte code
Compiler
Because of its basic primitive programming language, Script, is very limited.
Turing complete means the programming language, in theory, allows you to program very complex contracts.

1 Like
  1. The Ethereum Virtual Machine or EVM for short is a protocol that executes the instructions of a smart contract in a decentralized environment.

  2. The EVM reads a machine language known as Bytecode.

  3. Solidity is a user friendly language that if put into a compiler will translate to Bytecode that the EVM can read.

  4. Bitcoin’s Script language is not a Turing Complete language so it is not able to perform the same computations that Ethereum can.

  5. A Turing Complete language is a language that can solve virtually any mathematical computation.

1 Like
  1. EVM executes smart contracts on Ethereum (and other supported blockchains).
  2. EVM can read instructions in Bytecode format.
  3. Solidity is one of the high level languages that can be used to develop smart contracts. Smart contracts developed in Solidity can be compiled into Bytecode so that they can be executed by the EVM.
  4. Bitcoin script is not Turing Complete, so does not allow complex smart contracts programming like Ethereum does. This is actually a feature of Bitcoin, not a bug, as the Bitcoin community wants to keep Bitcoin focused on Payments only.
  5. Turing Complete programming languages are languages which can be used to execute any mathematical computations. They implement for instance the concept of loops which do not exist on non-turing-complete languages.
1 Like
  1. What does the EVM do?
    It reads the Byte Code and tells the CPU to execute the terms of smart contractse.
  2. What is the format of the instructions that the EVM can read?
    EVM reads the Bytecode from the Solidity compiler
  3. What is the relationship between the programming language Solidity and Bytecode?
    The smart contracts are written in Solidity. The Solidity compiler takes code and compiles
    logic and instructions into Bytecode then the EVM reads the Bytecode.
  4. Why can’t Bitcoin run the same type of complex programs like Ethereum can?
    Bitcoin has script like multi sig contracts. Scripts is not Turing complete. It is not able to solve all problems. It is limited. Bitcoin did not implement due to spamming loops and block size limitation.
  5. What is a Turing Complete programming language?
    Turing complete language contains Loops which tell the program perform a set of functions once, then loop back to perform again.
1 Like
  1. What does the EVM do?
  2. What is the format of the instructions that the EVM can read?
  3. What is the relationship between the programming language Solidity and Bytecode?
  4. Why can’t Bitcoin run the same type of complex programs like Ethereum can?
  5. What is a Turing Complete programming language?
  1. The EVM is the Ethereum Virtual Machine, which acts as the master environment (consolidating all the ethereum nodes that act as singular CPU’s on the network) that processes everything on the ethereum blockchain, by decompiling code into bytecode and reading the bytecode and then carrying out the instructions within the bytecode. A version of the EVM is run by every ethereum node on the network, which enhances security and maintains constant consensus globally.

  2. The EVM reads bytecode, which it obtains by decompiling the smart contract code which is written in solidity.

  3. Solidity is the main programming language for ethereum smart contracts, and the EVM then translates the solidity code into bytecode which the EVM can process and act upon. Solidity is translated into bytecode by the programming environment.

  4. Bitcoin is not turing-complete, meaning that you cannot program complex applications using the bitcoin programming language. Ethereum on the other hand is turing-complete, allowing developers (in theory) to take advantage to code almost any application that you can think of. Bitcoin on the other hand can only handle simple processes and as a result simple applications.

  5. A turing-complete language can use loops, which are a fundamental tool in coding anything that has complexity. The language can run instances within loops as many times as is required to reach the desired outcome. This allows complex calculations to happen using as little resources as possible. Turing-complete languages can, in theory, solve almost any problem, giving developers the freedom to innovate as much as they want by following the specified language rules.

1 Like
  1. EVM is the Ethereum Virtual Machine. EVM reads and executes smart contracts.
  2. Instructions are in Bytecode.
  3. Solidity is an easier to use programming language that can then be compiled into Bytecode.
  4. It runs on script which is a less complex programming language.
  5. Turing Complete programming language has increased complexity and allows for further programming that can solve all problems. It also has loop features that can do any number of things depending on the outcomes.
1 Like