Homework on EVM

As I understand it:

  1. The EVM gives instructions to each CPU to maintain security on the Ethereum network. Basically the program that executes Ethereum’s smart contracts.

  2. EVM Byte Code

  3. Solidity is what smart contracts are constructed in. Byte code takes the solidity code and interprets it into executable code for the EVM.

  4. Bitcoin is written in Script which is not Turing complete.

  5. Turing Complete programming language allows for a more robust programming experience, mainly allows for looping or language that dictates to the CPU to execute directions over and over again.

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 doubt, please let us know so we can help you! :slight_smile:

Carlos Z.

3 Likes

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

Almost sir, Solidity its a programming language that you use to write instructions in a human readable format and then it compile those instructions into ByteCode that later will be used for the EVM to execute those instructions in a non-readable format for humans (meaning the ByteCode is hard to read for humans, but easy to execute for computers).

Indeed sir, but also for the ability to solve any kind of problem and the capacity to use loops(run the same piece of code as many time that is need it).

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

Carlos Z.

  1. The EVM executes byte code from the etherium blockchain to determine a result.

  2. Byte code

  3. Programs are written in solidity language and then compiled into byte code to be executed by the EVMs

  4. Bitcoin is written in Script which is a turing incomplete coding language so it can not execute more complex programs. Also no one in the BTC community wants to bloat the bitcoin network with it.

  5. A Turing complete program language is capable of things such as executing loops or handling back references, it is essentially a language capable of advanced programming. A Language that can handle more complex computational problems.

1 Like

1- Evm read and execute smart contract.
2- Evm can read byte codes
3- Solidity is complied to byte codes that is executable on the EVM
4- Because bitcoin runs on a not turing complete program while ETH runs on a turing complete program which is called solidity.
5- Script and solidity.

@thecil thank you for the clarification!

1 Like
  1. The Etherium Virtual Machine (EVM) reads and understands byte code that is uesd to execute a command.

  2. The format that the EVM can read is byte code.

  3. Solidity composes commands understandable to us into byte code via compilation that the EVM understands and executes.

  4. BTC cannot run the same type of complex programs that ETH does because the BTC network is not Turing Complete with its use of Script.

5.A turing complete programming language is a program capable of complex actions.

1 Like
  1. What does the EVM do?
    The Ethereum Virtual Machine or EVM is the runtime environment for smart contracts in Ethereum. It is not only sandboxed but actually completely isolated, which means that code running inside the EVM has no access to network, filesystem or other processes. Smart contracts even have limited access to other smart contracts.

  2. What is the format of the instructions that the EVM can read?
    Smart contracts are often written in a programming language called Solidity , a language similar to JavaScript and C++. Other languages for writing smart contracts include Vyper and Bamboo. Before Solidity was released, other languages like Serpent and Mutan were used.

  3. What is the relationship between the programming language Solidity and Bytecode?
    Solidity is compiled to bytecode that is executable on the EVM. Smart contract languages like Solidity cannot be executed by the EVM directly. Instead, they are compiled to low-level machine instructions called opcodes. Bytecode, also termed portable code or p-code, is a form of instruction set designed for efficient execution by a software interpreter.

  4. Why can’t Bitcoin run the same type of complex programs like Ethereum can?
    Bitcoin’s scripting language is not turing complete. A turing complete programming language is one that can be used to simulate any single-taped Turing machine. In other words, it can be used to solve any computation problem that a Turing machine can run given enough time and memory. By not being turing complete, Bitcoin script restricts what you can do. Ethereum is a cryptocurrency launched in 2015 and built from the ground up using its own blockchain technology. It was designed to be a more generalized protocol than Bitcoin’s blockchain, with the explicit goal of doing more than just creating and recording transfers of a blockchain network’s native tokens.

  5. What is a Turing Complete programming language?
    In computability theory, a system of data-manipulation rules such as a computer’s instruction set, a programming language, is said to be Turing-complete or computationally universal if it can be used to simulate any Turing machine. This means that this system is able to recognize or decide other data-manipulation rule sets. Turing completeness is used as a way to express the power of such a data-manipulation rule set. Virtually all programming languages today are Turing-complete. The concept is named after English mathematician and computer scientist Alan Turing.

A related concept is that of Turing equivalence – two computers P and Q are called equivalent if P can simulate Q and Q can simulate P.

A Turing machine can make decisions based on what it sees in memory - The ‘language’ that only supports + , - , * , and / on integers is not Turing complete because it can’t make a choice based on its input, but a Turing machine can.

A Turing machine can run forever - If we took Java, Javascript, or Python and removed the ability to do any sort of loop, GOTO, or function call, it wouldn’t be Turing complete because it can’t perform an arbitrary computation that never finishes. Coq is a theorem prover that can’t express programs that don’t terminate, so it’s not Turing complete.

A Turing machine can use infinite memory - A language that was exactly like Java but would terminate once it used more than 4 Gigabytes of memory wouldn’t be Turing complete, because a Turing machine can use infinite memory. This is why we can’t actually build a Turing machine, but Java is still a Turing complete language because the Java language has no restriction preventing it from using infinite memory. This is one reason regular expressions aren’t Turing complete.

A Turing machine has random access memory - A language that only lets you work with memory through push and pop operations to a stack wouldn’t be Turing complete. If I have a ‘language’ that reads a string once and can only use memory by pushing and popping from a stack, it can tell me whether every ( in the string has its own ) later on by pushing when it sees ( and popping when it sees ) . However, it can’t tell me if every ( has its own ) later on and every [ has its own ] later on (note that ([)] meets this criteria but ([]] does not). A Turing machine can use its random access memory to track () 's and [] 's separately, but this language with only a stack cannot.

A Turing machine can simulate any other Turing machine - A Turing machine, when given an appropriate ‘program’, can take another Turing machine’s ‘program’ and simulate it on arbitrary input. If you had a language that was forbidden from implementing a Python interpreter, it wouldn’t be Turing complete.

1 Like
  1. Ethereum virtual machine is a piece of code that executes smart contract
  2. EVM can read bytecode
  3. Solidity translates the code via a compiler into Bytecode so the EVM can read it.
  4. The community didn’t want the bitcoin blockchain gets spammed with loops and other smart contracts, so they maintained bitcoin as it is.
  5. Turing complete programming language is a language which can execute any kind of code, mathematical operation, script (bitcoin prog. lang.) can’t do that so in fact it is not a turing complete language.
1 Like
  1. Interprets and and execute Smart contracts
  2. Any language but executes in bytecode
  3. Solidity is the language the ethereum network uses byte code is the code used to execute Smart Contracts.
  4. Because it uses Script language
  5. Solidity because it can execute commands called loops-several times
1 Like

5. What is a Turing Complete programming language?

Hello sir, i think you have a miss understanding with the definition of Turing Complete Programming language, if you can, please try to describe a little better.

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

Carlos Z.

Wow :open_mouth:, amazing answer sir, thank you for being so detailed on the Turing Complete! Keep it like that! :muscle:

Carlos Z.

  1. EVM makes it possible to execute code in such a way that we’re all in consensus. The EVM executes the “instructions” (that were coded in solidity and then compiled to bytecode) in the smart contracts and reach some sort of result. If the EVM of the different nodes come to the same result they have reached consensus.

  2. Bytecode

  3. Solidity is the programming language in which we code a smart contract, that code will then be compiled into bytecode (EVM can only read bytecode). The evm then tells the cpu what to do.

  4. Because Bitcoins programming language (script) is not turing complete.

  5. A programming language which can solve the problem it needs to in order to run an application (ie loops). With a tc language you can programm basically what you can think of.

2 Likes
  1. EVM can read and execute smart constracts. It is also used to transmit smart contracts over the network and make them secure.
  2. The instructions are written with a programming language (e.g. Solidity), they are then compiled in byte codes and this byte code is read by the EVM.
  3. Read above.
  4. Because the programming language of Bitcoin (script) is not Turing complete, therefore it is limited and it is not possible to perform some operations with it.
  5. Is a programming language that has no limitations, so it allows you to program what you want, theoretically.
1 Like
  1. EVM is kind a medium or firewall to protect CPU (and whole ETH network) from malicious software getting access to CPU as a Smart contract.
  2. EVM runs on Bytecode.
  3. They are both turing complete languages. I might be wrong, but since, CPU knows only 0 and 1, Solidity is kinda a more user friendly grandson of the Bytecode.
  4. Because Bitcoin was programmed in non turing complete language Script.
  5. The most important difference is that there is no loop function in non turing complete language.
1 Like
  • What does the EVM do? It´s the virtual element that reads the smart contract on the network. between the CPU of our computers and the program. It reads the instructions from the smart contract and makes sure it´s safe and complies with the network rules and then it passes the instructions to the CPU to execute.
  • What is the format of the instructions that the EVM can read? it reads byte code
  • What is the relationship between the programming language Solidity and Bytecode?
    Solidity is compiled into byte code using a compiler, and then it runs on the CPU of a node, via the EVM.
  • Why can’t Bitcoin run the same type of complex programs like Ethereum can? Because the programming language of bitcoin, Script is not turing complete.
  • What is a Turing Complete programming language?
    With a turing complete language ( TC) we can write any program and applications, there´s no limitations . A non turing complete language is very limited,
1 Like
  1. It executes contract bytecode.

  2. Bytecode

  3. Solidity is the language used by programmers which is then changed to bytecode.

  4. Because it is not turing complete.

  5. Solidity

1 Like
  1. EVM executes smart contracts through the CPU of the particular node.
  2. bytecode
  3. bytecode can be written in Solidity programing language. It can be also written in Viper. EVM executes the bytecode, no matter what was the programing language.
  4. Because BTC is based on Blockchain 1.0, Etherium is on Blockchain 2.0.
  5. You can write whatever program you want, can replicate any conditions.
1 Like
  1. The EVM is responsible fro excuting the socalled smart contracts containing the business logic to be executed

  2. The EVM is executing Bytecode - just like the Java VM - a special instruction set only understood by the EVM - not in human readable syntax.

  3. The Ethereum developers write smart contracts for the EVM by typing in instructions in the programming language Solidity (much like javascript syntax) - and EVM compiler then converts the Solidity source code to Bytecodes in EVM syntax

  4. Bitcoins developer language - called Script - is not Turing complete, meaning it can not express all types of logic - for instance it lacks the ability to do loop instructions

  5. Refer to 4. - A Turing complete language is able to express all kinds of matematical/ logic problems in the programming language, looping, decision making etc., so that you can write programs that can handle all the problems you can imagine in your mind

1 Like
  1. What does the EVM do?
  • The EVM, or Etherium Virtual Machine, is used for reading smart contracts and executing commands to the network nodes. It also acts as a layer of security in order to help prevent spam or malicious code.
  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, much like English, is the Ethereum programming language which must then be compiled into Bytecode so that the EVM can read it
  1. Why can’t Bitcoin run the same type of complex programs like Ethereum can?
  • Bitcoin’s functions are limited in this capacity due to not being Turing Complete. BTC works best as hard money or store of value which is why Ethereum was developed on order to handle more complex programs
  1. What is a Turing Complete programming language?
  • Its a computational language which can be used to run any program for example Loops
2 Likes