Download as pdf or txt
Download as pdf or txt
You are on page 1of 3

ALDAY, Gerikah L.

UNIT 2: Speaking the Language

BSCpE 1-5 Pedrito Jr. Tenerife

Unit 2: Critical Thinking

1. Describe the difference between machine, assembly, and high-level computer


languages. Give an example of machine language code and assembly
language code and then name two high-level languages.

Machine language is the lowest-level programming language that is


used to directly control a computer's hardware. It consists of binary code that
is interpreted directly by the computer's processor. Machine language is
specific to the architecture of the processor and is difficult for humans to read
and write.

Example of Machine Language code:

01000001 01101110 01101111 01110010 01101100 01100101 00101100 00100000 01101111


01110101 01110010 01100101 00100001

Assembly language is a low-level programming language that provides


a more human-readable representation of machine language. Assembly
language consists of mnemonics that represent individual machine language
instructions. Assembly language is still specific to the architecture of the
processor, but it is easier for humans to read and write than machine language.

Example of Assembly Language code: MOV AX, 0 MOV BX, 10 ADD AX, BX

High-level languages are programming languages that are designed to


be easier for humans to read and write than low-level languages like machine
language and assembly language. High-level languages provide a high level
of abstraction from the underlying hardware, making them platform
independent. Examples of high-level languages include Python, Java, C++, and
Ruby.

Example of High-level Language code: x = 0 y = 10 x = x + y

In conclusion, machine language is the lowest-level programming


language that is specific to the architecture of the processor, assembly
language provides a more human-readable representation of machine
language, and high-level languages are designed to be easy for humans to
read and write and provide a high level of abstraction from the hardware.

2. Consider this line of code. What must be true about the programming
language that it comes from? (Hint: think specifically about the first word in the
line.)

string greeting = "Hello, world!";

The programming language that this line of code comes from supports the
use of data types, specifically a data type for strings.

3. Describe a situation where it would be helpful to use pseudocode.

Pseudocode can be useful in a situation where a team of developers is


working on a complex project and need to break down the steps into smaller,
simpler sections. For example, when creating an algorithm for a new software
application, pseudocode can help to outline the steps involved in a clear and
concise manner, making it easier for the team to understand and implement the
solution. This can save time and resources by allowing the team to focus on the
core functionality and avoid getting bogged down in low-level details or complex
code. Additionally, pseudocode can help to identify any potential issues or
problems early in the development process, allowing for corrections and
adjustments to be made before the actual code is written.

4. Describe a situation where natural language programming is currently in use.

Natural language programming is currently in use in the field of


conversational interfaces, such as chatbots and voice-activated assistants. For
example, a customer service chatbot can use natural language processing to
understand and respond to customer inquiries in a way that feels natural and
conversational. In this situation, the chatbot can use natural language
programming to interpret customer queries, provide relevant information, and
offer solutions to common problems. The chatbot can also use natural language
generation to produce responses that are written in a clear and human-like
manner. This approach makes it easier for customers to interact with the chatbot
and helps to improve the overall user experience.
5. If you were given a choice of working with a compiled language or an
interpreted language, which would you choose? Why? How do you think the
language that you chose could be used in a field of study other than computer
science?

If I were be given a chance to choose, I will choose interpreted language


because it is good if the project requires a faster development time and ease
of modification. Because of this an interpreted language may be the better
choice. Interpreted languages are executed directly by the interpreter, making
them easier to debug and modify. On the other hand, Compiled languages are
generally faster and more efficient, but require more time to compile and may
be less flexible to modify.

You might also like