How Can Machine Language, Assembly Language and A High-Level Language Be Distinguished?
Procedural programming focuses on processes and steps while object-oriented programming focuses on objects that contain both data and code. Some key differences include procedural programming being more closely tied to hardware while object-oriented programming is more focused on application development. Object-oriented programming also provides better data encapsulation and management.
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0 ratings0% found this document useful (0 votes)
17 views14 pages
How Can Machine Language, Assembly Language and A High-Level Language Be Distinguished?
Procedural programming focuses on processes and steps while object-oriented programming focuses on objects that contain both data and code. Some key differences include procedural programming being more closely tied to hardware while object-oriented programming is more focused on application development. Object-oriented programming also provides better data encapsulation and management.
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 14
Q1
How can machine language, assembly language and a
high-level language be distinguished? G4 machine language, assembly language and a high-level language ● Machine Language (low level language) Low-Level language is the only language which can be understood by the computer. Low-level language is also known as Machine Language. The machine language contains only two symbols 1 & 0
● Assembly Language (middle level language)
Middle-level language is a computer language in which the instructions are created using symbols such as letters, digits and special characters.
● High Level Language
High-level language is a computer language which can be understood by the users. The high-level language is very similar to human languages and has a set of grammar rules that are used to make instructions more easily. Languages like FORTRAN,C, C++, JAVA, Python, etc., are examples of high- level languages Machine Language Assembly Language High-Level Language Data is only expressed in In assembly language, High-level languages require the machine language using binary mnemonics can be used to use of a compiler or an (0s and 1s), hexadecimal, and represent data. interpreter for their translation octal decimal formats. into the machine code. Machine language is the most Assembly is a low-level High-Level Language are fundamental of all programming language that programmer-friendly languages programming languages. All needs an assembler to turn the that are manageable, easy to instructions are executed instructions into a final object understand, debug, and widely immediately by the system's or machine code. used in today’s times. CPU (Central Processing System). Machine language does not Assembly language allows for It is very easy to debug these allow for changes or error changes and error correction languages. correction. In the case of machine These languages execute at a High-level languages take more languages, the execution slower rate than any machine time for execution as compared process is extremely quick. It's language. to low-level languages because because their info is already these require a translation stored in binary format. program. Machine language is impossible Because some alphabets and High-level languages are to learn since it is extremely mnemonics are employed, the human-friendly. So they are difficult to memorize. assembly language is simple to very easy to understand and memorize. learn by any programmer. Hardware influences machine Assembly language is machine- These are portable from any language. specific and therefore not one device to another. portable. A translator is not required. To translate mnemonics into High-level languages require a Machine language is the machine-readable form, translation program. machine intelligible form. Assembler is employed as a translator. Q4 What are the similarities and differences between a procedural paradigm with an object-oriented paradigm? Lập trình thủ tục • Lập trình thủ tục có thể được định nghĩa là một mô hình lập trình bắt nguồn từ lập trình có cấu trúc, dựa trên khái niệm gọi thủ tục. Procedural Pr • Các thủ tục, còn được gọi là thường ogramming (L trình, chương trình con hoặc hàm, ập trình thủ đơn giản bao gồm một loạt các bước tính toán được thực hiện. tục) • Trong quá trình thực hiện chương trình, bất kỳ thủ tục đã cho nào cũng có thể được gọi tại bất kỳ thời điểm nào, kể cả bởi các thủ tục khác hoặc chính nó. • FORTRAN, ALGOL, COBOL, Ngôn ngữ BASIC, Pascal và C. được sử dụng trong lập trình thủ tục: • Lập trình hướng đối tượng có thể được định nghĩa là một mô hình lập trình dựa trên khái niệm đối tượng. Các đối Object- tượng chứa dữ liệu ở dạng thuộc tính Oriented và mã ở dạng phương thức. • Trong lập trình hướng đối tượng, các Programming chương trình máy tính được thiết kế (Lập trình bằng cách sử dụng khái niệm đối tượng tương tác với thế giới thực. hướng đối • Các ngôn ngữ lập trình hướng đối tượng) tượng rất đa dạng nhưng những ngôn ngữ phổ biến nhất là dựa trên lớp, nghĩa là các đối tượng là thể hiện của các lớp, cũng xác định loại của chúng. Các ngôn • Java, C++, C#, Python, PHP, JavaScript, Ruby, Perl, ngữ được Objective-C, Dart, Swift, Scala. sử dụng trong Lập trình hướng đối tượng: • Chúng đều là phương pháp để tạo ra một hành động hoặc Điểm giống chuỗi hành động cho máy tính, vi điều khiển hành động. Sử nhau giữa lập dụng các ngôn ngữ lập trình để trình thủ tục tạo nên các chuỗi hành động đó và phản xạ theo môi trường và lập trình hoặc con người tác động lên. hướng đối tượng Điểm khác nhau • POP hướng tới việc lập trình các thao tác, công việc, chia nhỏ công việc lớn thành nhỏ. Việc lập trình hướng tới việc giải quyết một vấn đề nhất định, không Mục tiêu lập thay đổi • OOP hướng tới lập trình các đối tượng trình hướng ( các đối tượng đó cũng có thể là các thao tác, công việc), chức năng của đối tới tượng cũng sẽ được phát triển hơn, có thể thay đổi dễ dàng • POP hướng tới việc thực thi, gắn chặt với kiến trúc của vi xử lý, chúng là một kiểu chuyển đổi cho con người có thể hiểu được ngôn ngữ của máy tính. • POP cũng chỉ sử dụng trong các ngôn ngữ bậc thấp, có thể can thiệp trực tiếp tới bộ vi xử lý, vi điều khiển Hướng của • OOP hướng tới việc phát triển ứng dụng, chúng tại lập trình gắn liền với các nhu cầu của con người. Chúng bỏ qua lớp giao tiếp với máy mà giúp con người phát triển ứng dụng một cách nhanh chóng nhất • Vậy nên OOP có thể khá thân thiện với con người và dễ dàng học tập hơn • Điều khiển dữ liệu • Với OOP thì dữ liệu và hàm của một đối tượng giống như một thành phần riêng biệt và bị hạn chế truy cập bởi các đối tượng khác. • Với POP, dữ liệu có thể truy cập một cách tự do giữa các hàm. Vì vậy bảo mật của OOP sẽ cao hơn POP • Quản lý dữ liệu • Lập trình hướng đối tượng sẽ làm cho việc viết chương trình trở nên trực quan và đơn giản, giống như việc ta đang tương tác với những thứ xung quanh mình vậy. Do nó đơn giản hơn nên sẽ mất ít công sức hơn, làm được nhiều hơn, dễ bảo trì và phát triển hơn. Trong OOP dữ liệu có thể thêm mới một cách dễ dàng từ các đối tượng trong khi với POP thì rất khó.