1 / 5

Understanding Computer Languages: Precise and Unambiguous Programming

Computer languages are designed to be unambiguous, precise, and free of ambiguity. They allow programmers to communicate instructions to computers in a way that ensures clarity and accuracy. High-level languages like Pascal and low-level languages like Assembly provide different levels of abstractness for programming tasks. Understand the syntax and semantics of programming languages to create error-free code efficiently.

makara
Télécharger la présentation

Understanding Computer Languages: Precise and Unambiguous Programming

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Why Computer Languages? • Compute are stupid. • They do not “understand” things. • They have to be told very precisely what to do. • Natural language are ambiguous. • “College Station’s largest (quality (free) newspaper)”.

  2. Programming language are designed to beunambiguous. • They are defined precisely, by syntax and semantics. • The meaning of each program is defined precisely. • Associativity is defined, e.g., 2-3-4 means (2-3)-4. • Priority of Operators is defined, e.g., 2+3*4 means 2+(3*4).

  3. High-Level Pascal Pgm Program Example: const x = 12; y = 30; var z: integer; begin z := x + y; end.

  4. Assembly Program EXAMPLE CSECT Balr 12 , 0 Using Base 12 Base L 2 , X A 2 , Y ST 2 , Z BCR 15 , 14 X DC F ’12’ Y DC F ’30’ Z DS F END CSECT

  5. Machine Code( Hexidecimal) 05C0 Balr 12 , 0 5820 C00E L 2 , X 5A20 C012 A 2 , Y • C016 etc. ST 2 , Z 07FE BCR 15 , 14 0000000C X DC F ’12’ 0000001E Y DC F ’30’ 00000000 Z DS F END EXAMPLE

More Related