Computer Programming Language ME 171
23 Questions
0 Views

Choose a study mode

Play Quiz
Study Flashcards
Spaced Repetition
Chat to lesson

Podcast

Play an AI-generated podcast conversation about this lesson

Questions and Answers

What is the primary function of a computer?

  • To input, process, and output data. (correct)
  • To store and output data.
  • To connect to the internet.
  • To execute financial transactions.
  • Which of the following components is NOT part of a computer's architecture?

  • Hardware
  • Software
  • Programming languages
  • User interface design (correct)
  • Which programming languages are introduced in this course?

  • Assembly and Pascal
  • Ruby and Go
  • Java and JavaScript
  • C, C++, and Python (correct)
  • What does the term 'data types' refer to in programming?

    <p>The various forms of data that can be processed.</p> Signup and view all the answers

    Which software is specifically mentioned as being used in the programming sessions?

    <p>Codeblocks</p> Signup and view all the answers

    What is a pointer in programming?

    <p>A variable that stores memory addresses.</p> Signup and view all the answers

    Which of the following is NOT a characteristic of structured programming?

    <p>It encourages the use of multiple programming languages.</p> Signup and view all the answers

    What is a characteristic feature of a supercomputer?

    <p>Capable of performing billions of calculations per second</p> Signup and view all the answers

    Which computer type is primarily utilized by large organizations for massive data processing?

    <p>Mainframe Computer</p> Signup and view all the answers

    What is the main purpose of microcontrollers?

    <p>To function as a single chip computer with processor and peripherals</p> Signup and view all the answers

    In what context are supercomputers primarily used?

    <p>In scientific and research institutions for complex calculations</p> Signup and view all the answers

    Which computer system is best suited for purposes like gaming and animation?

    <p>Workstation</p> Signup and view all the answers

    Which characteristic best describes a mainframe computer?

    <p>Designed for large concurrent user access</p> Signup and view all the answers

    Which of the following statements is true regarding modern supercomputers?

    <p>Can achieve speeds of around 100 Petaflops</p> Signup and view all the answers

    Which device is an example of a compact, purpose-built computer?

    <p>Raspberry PI zero</p> Signup and view all the answers

    What is one primary difference between microcontrollers (MCUs) and microprocessors?

    <p>MCUs are specialized for controlling devices and processes.</p> Signup and view all the answers

    How do Harvard architecture and Neumann architecture differ in terms of instruction execution?

    <p>Harvard architecture can execute multiple instructions in one cycle.</p> Signup and view all the answers

    Which of the following best describes a System on a Chip (SoC)?

    <p>It integrates most components of a general-purpose computer on a single die.</p> Signup and view all the answers

    What role does the CPU play in a computer system?

    <p>It serves as the main processing unit executing instructions.</p> Signup and view all the answers

    What is a common application of artificial intelligence in consumer technology?

    <p>Providing virtual assistants like Siri and Alexa.</p> Signup and view all the answers

    Which statement is true about the memory used in microcontrollers?

    <p>They often include ROM as well as RAM.</p> Signup and view all the answers

    In the context of execution cycles, what happens during the first cycle of instruction execution in a Harvard architecture?

    <p>The previous instruction is completed and the next one is fetched.</p> Signup and view all the answers

    Why are microcontrollers considered economical for device management?

    <p>They reduce size and cost for digital control in devices.</p> Signup and view all the answers

    Study Notes

    Course Information

    • Course Title: Computer Programming Language
    • Course Number: ME 171
    • Credit Hours: 3.00
    • Instructor: Dr. Md. Mamun, Dr. S. M. Shavik

    Course Content

    • Introduction to computer hardware and its working principle
    • Programming logic, algorithms, and flowcharts
    • Introduction to structured programming
    • Overview of C and C++ programming languages
      • Fundamentals of C and C++
      • Data types and expressions
      • Operators
      • Libraries and keywords
      • Statements
      • Control statements
      • Input and output systems
      • Pointers
      • Arrays
      • Functions
      • Strings
      • File Input/Output
      • Structure and Union
    • Object-oriented programming
    • Introduction to advanced programming (Python)

    Textbooks

    • Teach Yourself C – Herbert Schildt, Osborne
    • Computer Fundamentals – Pradeep K. Sinha, BPB Publications
    • [Any suitable book on C programming]
    • The C Programming Language – Brian W. Kernighan and Dennis M. Ritchie, Pearson Education

    Software

    • Codeblocks
    • Any suitable compiler for C programming (DevCPP, Visual C++, Turbo C++, Borland C++, Geany, GNU GCC, Cygwin, Xcode, etc.)

    What is a Computer?

    • A computer is an electronic device that inputs, processes, and outputs data.
    • A computer stores data, interacts with devices, and executes programs.
    • Computers are available in various sizes and configurations (mainframe, supercomputer, single-board computer, smartphone, tablet, etc.).

    Computer Types

    • Mainframe Computer (Concurrency)
    • Supercomputer (Speed)
    • Desktop Computer (General-purpose)
    • Workstation (Specialized—gaming, simulation, animation workstations)
    • All-in-one Computer
    • Mac Mini
    • Intel NUC
    • Laptop Computer
    • Raspberry PI
    • Raspberry PI zero
    • Stick Computer
    • Surface Pro
    • Galaxy S9
    • iPad Pro
    • iPhone XS Max

    Mainframe vs. Supercomputers

    • Mainframe computers are professional-level commercial computers that act as servers.
    • Supercomputers are the fastest computers for processing data.
    • Mainframes are used in large organizations to handle thousands of concurrent users (banks, government databases, etc.).
    • Supercomputers are used for high-performance computing in space centers, weather forecasting, etc.

    Microcontrollers and System-on-Chip (SoC)

    • Microcontrollers (MCUs) are small computers on a single chip with CPUs, memory, and peripherals.
    • They are used in embedded applications (car engine control systems, medical devices).
    • SoCs contain most of the main components of a general-purpose computer, such as CPUs and memory, in a single chip.

    CPU Architecture

    • Neumann: Single memory interface for data and code.
    • Harvard: Separate program and data memory interfaces.

    Why is a Computer?

    • A computer is a synergistic system combining CPU speed and human intelligence.
    • Artificial intelligence (AI) and machine learning programs use artificial neural networks (ANNs) which are complex programs developed by humans.
    • These programs help machines learn and perform increasingly complex tasks.
    • Examples of AI systems include IBM's Deep Blue, Apple's Siri, etc.

    Computer Programming

    • Traditional programming directly instructs the CPU to operate on input data for a specific output.
    • Machine learning programming trains the computer on dataset patterns to predict new data.
    • A programming language helps communicate instructions to the computer.
    • Examples of languages include Fortran, C, C++, Python, Java, HTML, PHP, Javascript, Perl, Ruby, Matlab, etc.

    Computer Languages (Abstraction)

    • Computer programming languages can be categorized into:
      • Low-level languages (Machine language): use binary patterns
      • Mid-level languages (Assembly language): use mnemonics
      • High-level languages (Fortran, C, C++, Java): use human-readable words and symbols

    Steps to Solve a Problem by Computer Programming

    • Step 1: Problem Definition
    • Step 2: Algorithm Development and Data Structure
    • Step 3: Coding
    • Step 4: Compiling, Linking, Testing, and Debugging

    Software Modules

    • Text Editor (Notepad, Wordpad, etc.)
    • Compiler/Interpreter (gcc, g++, etc.)
    • Linker (ld, lld, etc.)
    • Debugger (gdb, windbg, etc.)
    • Integrated Development Environment (IDE) (Codeblocks, Dev-C++, etc.)

    Compiler vs. Interpreter

    • A compiler translates the entire source code into machine code before runtime.
    • An interpreter translates one line of the source code at a time during runtime.
    • Compiled programs generally run faster, but interpreters are generally platform-independent.

    Primary Memory (RAM)

    • Primary memory is made of cells (bits) or groups of bits (bytes).
    • A bit represents a voltage state (0 or 1).
    • Bytes are groups of 8 bits.
    • The CPU reads and writes values from RAM memory cells using addresses assigned by the OS.
    • RAM is volatile, so it requires persistent storage for long-term data.

    Major Components of a Computer System

    • Hardware (physical components)
    • Software (data and programs)

    Other Important Details

    • Hardware vs. Software
      • Hardware are the physical parts of a computer system (CPU, motherboard, RAM, HDD, monitor, keyboard, etc.)
      • Software are the instructions/programs for the hardware to run and operate (Operating Systems like Windows, Linux, etc., and applications like word processors)

    Computing Platforms

    • Computing platforms are combinations of hardware (CPU, etc.) and software (OS like windows)
    • Different combinations provide different advantages by supporting different tasks and functionalities.

    Studying That Suits You

    Use AI to generate personalized quizzes and flashcards to suit your learning preferences.

    Quiz Team

    Related Documents

    Introduction To Hardware PDF

    Description

    This quiz covers the fundamentals of computer programming, focusing on C and C++. It includes topics such as programming logic, algorithms, control statements, and object-oriented programming. Test your understanding of key concepts from the course and prepare for practical applications.

    More Like This

    Use Quizgecko on...
    Browser
    Browser