Homework on EVM

Thanks for the correction sir. =)

1 Like
  1. EVM makes it possible to execute code in the network in such a way that all are in consensus what result should be.
  2. The format of instruction that EVM can read is Smart Contract.
  3. Instruction for EVM are written in Bytecode. In order to EVM to be able to read the instruction programer have to take Solidity code and compile it (with special application compiler) down to ByteCode.
  4. Because BTC script is not Turing complete language.
  5. It is programming language that has loops that allows us to tell to software to do some things a lot of times (1000 or more).
  1. What does the EVM do? It allows you to execute the terms of a contract by deriving a consensus between all of the operating nodes across the network.

  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 is the programming language that compiles the logic into Bytecode, which then provides instructions for the EVM to execute.

  4. Why can’t Bitcoin run the same type of complex programs like Ethereum can? Bitcoin is not Turing complete, meaning that the programming language in Bitcoin is limited in what you can program. For example, unlike Ethereum, you cannot program Loops in Bitcoin.

  5. What is a Turing Complete programming language? It allows for programmability, scripting and gives developers the ability to create any new application.

  • What does the EVM do?
    The Evm reads the code and executes smart contracts

  • What is the format of the instructions that the EVM can read? solidity and byte code

  • What is the relationship between the programming language Solidity and Bytecode?
    solidity is the language
    bytecode is program code that has been compiled from source code into low-level code

  • Why can’t Bitcoin run the same type of complex programs like Ethereum can?
    because it is not turing complete and is limited

  • What is a Turing Complete programming language? solidity
    It essentially means you can write programs (contracts) that can (for the most part) solve any reasonable computational problem.

Using Solidity and Serpent you have the ability to perform looping and branching statements as well as local state storage. This functionality is important to have in order to implement most non-trivial computer programs.

Because the Ethereum VM is turing complete I can technically implement logic in say Python and translate to solidity if I want.

Turing completeness is important for Ethereum smart contracts because you have the ability to implement sophisticated logic.

1. What does the EVM do?

It reads and “executes” the byte-code instructions using the relevant input values in
order to perform specific tasks on the ETH network. (Interpreter like JVM)

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

Byte-code that is compiled from Solidity/Viper

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

Solidity is a high level language used by developers to create programs (SmartContracts).
When these high level programs are compiled, they generate a instruction set that can be
interpret by the EVM (same as with .exe on windows)

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

Apart from the decision made by BTC to limit its functionality to BTC transactions only,
it does not have a “framework” that enables programmers to develop complex/TC programs.

5. What is a Turing Complete programming language?

It is a high/low level language that allows the programmer to create scenarios where the
same functionality can be executed more than once through means of loops (eg. for, while, do-while)

1)EVM is Etherum virtual machine. It runs smart contracts on nodes in the network. It prevents malicious activity from happening.
2)Solidity (byte code)
3)Solidity is a programming language like Javascript that can be compiled into byte code.
4)because bitcoin uses script as it programming language. The script is not Turing complete which means it has limited capability. Where else, etherum(solidity) is Turing complete .
5)Turing complete programming language means it can program anything that the programmer insert. It can solve any computational problem

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

  1. What does the EVM do?

Answer: Ethereum Virtual Machine

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

Answer: Solididty compiles instruction into Byte Code.

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

Answer: Solidity is comiled into Byte code which interact with your CPU.

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

Answer: Because script language is Not Turing Complete ( e.g. No loops)

  1. What is a Turing Complete programming language?

Answer: A language that can theoretically program any instruction set
to run a program albeit, time and cost to do it may make it impractical.

  • What does the EVM do?
    EVM is an encapsulated CPU that execute the instructions in the smart contract.
  • What is the format of the instructions that the EVM can read?
    The EVM can only read byte codes
  • What is the relationship between the programming language Solidity and Bytecode?
    Solidity is a programming language you used to write the instructions/code (it is like an English), the byte code is a compiled instruction that is compiled by the Solidity compiler. The compiled code which is in byte code is what the EVM would read so it could execute the instructions from the Smart Contract.
  • Why can’t Bitcoin run the same type of complex programs like Ethereum can?
    It is designed by the Bitcoin developers this way to prevent spam. It also prevents sending big lines of codes like the smart contract, which could increase the block chain size.
  • What is a Turing Complete programming language?
    Turing complete programming language, is a programming language where (by concept) you could program anything you need to code. It has features like the looping. Solidity is an example of a Turing complete programming language.
  1. What does the EVM do?
    The EVM runs the code/programmes deployed to the network using the resources of the host computers

  2. What is the format of the instructions that the EVM can read?
    The EVM reads machine (byte) code

  3. What is the relationship between the programming language Solidity and Bytecode?
    Solidity is the human-computer interpreter interface; as any programming language it allows the user to specify code in an intuitive way, largely adhering to normal language/grammar, without needing to learn to code in 1s and 0s

  4. Why can’t Bitcoin run the same type of complex programs like Ethereum can?
    bitcoun is not Turing complete, meaning only basic functions can be coded

  5. What is a Turing Complete programming language?
    a comprehensive language which allows the programming of complex functions

  • The EVM allows you to run smart contracts on nodes CPUs within the network.
  • Bytecode
  • The Solidity complier complies Solidity code into Bytecode
  • Bitcoin’s “script” language is not turning complete, meaning it cannot complete complex calculations.
  • A language which can solve any computational problem.

Quite close miss, but the format of the instructions that EVM read is ByteCode .

Smart Contract is the entire set of instructions that has been compiled into ByteCode in order to the EVM to read and execute those instructions.

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

Carlos Z.

1 Like
  1. It reads smart contracts and then executes those instructions via the CPU.
  2. Bytecode that is compiled from Solidity.
  3. Bytecode is compiled Solidity.
  4. Because it is programmed with a Turing incomplete language called script.
  5. Languages that allow for loops to be run. This means an action can be executed any number of times without having to hand program each action.
1 Like
  1. What does the EVM do?
    R: Ethereum Virtual Machine is a system that can read a smart contract and tell the CPU or the Network what to do, it could be seem as an interface between smart contacts and nodes.

  2. What is the format of the instructions that the EVM can read?
    R: Byte code

  3. What is the relationship between the programming language Solidity and Bytecode?
    R: Bytecode program is generated after compiling a program coded in Solidity

  4. Why can’t Bitcoin run the same type of complex programs like Ethereum can?
    R: It is not Turing complete, BTC only performs native scripts meanwhile ETH can integrate functions such as: loops or conditionals

  5. What is a Turing Complete programming language?
    R: A program can perform complex statements

1 Like
  1. The EVM is a piece of code that all computers on the network run, which allows for smart contracts to be deployed, read, and executed. It exists as a middle man between the smart contract and the CPU so that a consensus can be reached and to ensure security in smart contracts.
  2. EVM can read byte code.
  3. Solidity compiles logic of instructions written in solidity and compiles it into byte code so that the EVM can read it.
  4. Bitcoins programming language script is not turning complete
  5. A turning complete programming language can run loops without the need for it to be programmed several times over. It essentially allows for complex computations
1 Like
  1. EVM is a virtual machine that can read and execute Bytecode to run smart contracts.
  2. ByteCode.
  3. Solidity is compiled into ByteCode to run on EVM.
  4. Bitcoin uses Script(promgramming language not TuringComplete) unlike Ethereum that uses Solidity.
  5. A turing programming language is so flexible that you can write whatever program you want on it.
1 Like
  1. The EVM exists to secure the network, as if it were one single machine, comprised of every node executing part of the EVM. This situation isolates smart contract code from individual nodes, so the host machines do not give other machines access to their stored information. This is a necessity because Solidity is a Turing Complete language.

  2. The EVM reads bytes (bytecode?)

  3. Bytecode compiles Solidity. (I’m not familiar with what compiling means so I don’t understand this relationship).

  4. Bitcoin can’t run the same types of programs Ethereum can because it is not on a Turing Complete language.

  5. A Turing Complete programming language is capable of recognize and decide other data manipulation rulesets (info accessed from the wikipedia article on Turing Completeness), for our purposes this simply means that Solidity is capable of processing any variable one could program into a smart contract, which is supposed to simulate a real life paper contract, without any necessity for trust or external powers (i.e. government) used to enforce the contract.

1 Like
  1. EVM will read the smart contract and tell the CPU what to do accordingly. Also another way of thinking about it is that the EVM encapsulates the smart contract.

  2. EVM can read Byte Code only.

  3. The original code is written using Solidity programming language and then compiled into Byte Code.

  4. Because it uses Script language and it is not Turing Complete.

  5. TC language is a language without any limitation to what can be programmed and anything is possible.

1 Like

o One EVM in each node executes the byte code of the smart contract.

o The EVM can only read the program in the format of EVM byte code.

o The program is written in human readable, java script like, language Solidity which is then compile into EVM bytecode.

o The bitcoin op-codes is not including possibility to program loops. Ethereum EVM is Turing complete which includes loops.

o The programming languages set of operations for manipulating data can simulate any Turing machine. The Turing machine is a theoretical construct that can solve any problem that is computable, with no real world limits as cpu cycles available, time, memory.

1 Like
  1. The EVM executes smart contracts on the ethereum network
  2. Smart contracts are written in solidity which is compiled into ethereum bytecode which the EVM can read and execute.
  3. See answer above ^
  4. Bitcoins programming language is very limited, it is not turing complete. You may not be able do any calculation or programming logic that you want.
  5. A turing complete language means that you can do any calculation, meaning you can execute any desired code logic with the language
1 Like
  1. The Ethereum Virtual Machine, or EVM, is an application that runs on all nodes in the Ethereum network. In order to protect the security of each node’s CPU, the EVM reads the instructions, in a smart contract for example, and then tells the CPU to execute those instructions.

  2. Bytecode

  3. The developer writes the code in a language called Solidity, then Solidity’s compiler compiles it into Bytecode, which is what the EVM reads. Regardless of the programming language used, if it can be compiled into Bytecode, the EVM can read it.

  4. Bitcoin’s programming language, called Script, is not Turing complete so it can only perform relatively simple computations. This was a design choice at Bitcoin’s inception, both to avoid spamming issues, and because Bitcoin was conceived as a digital currency and not a blockchain platform to run applications on.

  5. In the 1930’s, Alan Turing proposed a theoretical machine which could solve any computational problem (even if it took a million years), so when a programming language is referred to as ‘Turing complete’, it means it could solve any kind of computational problems, allowing a developer to develop potentially any kind of application.

1 Like