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. (C)</p> Signup and view all the answers

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

<p>Codeblocks (B)</p> Signup and view all the answers

What is a pointer in programming?

<p>A variable that stores memory addresses. (D)</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. (A)</p> Signup and view all the answers

What is a characteristic feature of a supercomputer?

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

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

<p>Mainframe Computer (C)</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 (D)</p> Signup and view all the answers

In what context are supercomputers primarily used?

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

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

<p>Workstation (D)</p> Signup and view all the answers

Which characteristic best describes a mainframe computer?

<p>Designed for large concurrent user access (C)</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 (B)</p> Signup and view all the answers

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

<p>Raspberry PI zero (A)</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. (A)</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. (D)</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. (B)</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. (C)</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. (A)</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. (C)</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. (C)</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. (D)</p> Signup and view all the answers

Flashcards

Supercomputer

The fastest type of computer, capable of processing billions of calculations per second, much faster than ordinary computers.

Mainframe Computer

A powerful commercial computer used by large organizations to manage massive amounts of data accessed by many users simultaneously.

Workstation (Specialized)

A computer designed for a specific task, such as gaming, simulations, or animation.

Desktop Computer (General-purpose)

A general-use computer intended for a wide range of tasks.

Signup and view all the flashcards

Microcontroller

A small computer on a single chip with a processor, memory, and programmable inputs/outputs.

Signup and view all the flashcards

Concurrency (Mainframe)

The ability of a mainframe computer to handle many users accessing the system at the same time.

Signup and view all the flashcards

Gigaflops

A unit of computer processing speed.

Signup and view all the flashcards

Petaflops

A unit of computer processing speed; a very large measurement, much greater than gigaflops.

Signup and view all the flashcards

Program Memory

A type of memory used to store instructions for the microcontroller. It's often called flash memory or OTP (One-Time Programmable).

Signup and view all the flashcards

ROM (Read Only Memory)

A type of memory pre-loaded with essential software or data that can't be changed by the user. It's often found alongside program memory in microcontrollers.

Signup and view all the flashcards

RAM (Random Access Memory)

A type of memory used to store temporary data that the microcontroller is currently using. It's typically much smaller than program memory.

Signup and view all the flashcards

MCU (Microcontroller)

A small computer on a single chip designed for specific tasks. It typically has a processor, memory, and input/output ports for interacting with external devices.

Signup and view all the flashcards

SoC (System on a Chip)

A single chip that contains most of the components found in general-purpose computers. It combines a CPU, memory, and other essential components.

Signup and view all the flashcards

Neumann Architecture

A computer architecture where instructions and data are stored in the same memory location. The CPU fetches both instructions and data one at a time.

Signup and view all the flashcards

Harvard Architecture

A computer architecture where instructions and data are stored in separate memory locations. This allows the CPU to fetch instructions and data concurrently, improving execution speed.

Signup and view all the flashcards

What is the advantage of Harvard architecture over Neumann?

Harvard architecture allows for parallel data and instruction fetching, resulting in faster execution speeds, whereas Neumann architecture requires sequential fetching.

Signup and view all the flashcards

What is a computer?

A computer is an electronic device that can input, process (based on instructions), and output data. It stores and retrieves data, interacts with devices, and executes programs, effectively providing computing capabilities to its users.

Signup and view all the flashcards

What are programs (in computer terms)?

Programs, often referred to as "instructions," are sets of commands that tell a computer what to do. They determine the steps and operations the computer performs on the input data.

Signup and view all the flashcards

What is meant by 'data processing' in a computer?

Data processing involves transforming raw input data into meaningful information. It encompasses operations like calculations, comparisons, sorting, and manipulation based on the instructions given by a program.

Signup and view all the flashcards

Hardware vs Software

Hardware refers to the physical components of a computer, such as the keyboard, monitor, and motherboard. Software refers to the intangible sets of instructions (programs) that tell the hardware what to do.

Signup and view all the flashcards

What are some examples of computer systems?

Computers come in many forms and sizes:

  • Mainframe computers are large systems used by organizations for massive data processing.
  • Supercomputers are incredibly powerful computers designed for complex computations, like scientific simulations.
  • Single Board Computers (SBCs) are compact computers, like the Raspberry Pi, that offer flexibility and affordability.
  • Smartphones and Tablets are mobile devices that combine computing power and communication capabilities.
  • PCs on a stick are miniature computers that can be plugged into any display for instant computing.
Signup and view all the flashcards

What are the key benefits of using a computer?

Computers offer several advantages:

  • Speed & Accuracy: They can process information much faster and with greater accuracy than humans.
  • Automation: They can automate repetitive tasks, saving time and effort.
  • Storage: They can store and retrieve vast amounts of information efficiently.
  • Communication: They enable communication and information sharing across the globe.
  • Creativity: They aid in creativity by providing tools for design, content creation, and artistic expression.
Signup and view all the flashcards

What are some examples of programming languages?

Programming languages, like C, C++, and Python, provide the instructions that the computer understands. These languages allow us to write programs that tell the computer what to do.

Signup and view all the flashcards

What are some common software used for programming?

Software like CodeBlocks, DevCPP, Visual C++, Turbo C++, Borland C++, Geany, GNU GCC, Cygwin, and Xcode provide an environment for writing and running programs in C and other programming languages.

Signup and view all the flashcards

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