Podcast
Questions and Answers
What is the primary function of a computer?
What is the primary function of a computer?
Which of the following components is NOT part of a computer's architecture?
Which of the following components is NOT part of a computer's architecture?
Which programming languages are introduced in this course?
Which programming languages are introduced in this course?
What does the term 'data types' refer to in programming?
What does the term 'data types' refer to in programming?
Signup and view all the answers
Which software is specifically mentioned as being used in the programming sessions?
Which software is specifically mentioned as being used in the programming sessions?
Signup and view all the answers
What is a pointer in programming?
What is a pointer in programming?
Signup and view all the answers
Which of the following is NOT a characteristic of structured programming?
Which of the following is NOT a characteristic of structured programming?
Signup and view all the answers
What is a characteristic feature of a supercomputer?
What is a characteristic feature of a supercomputer?
Signup and view all the answers
Which computer type is primarily utilized by large organizations for massive data processing?
Which computer type is primarily utilized by large organizations for massive data processing?
Signup and view all the answers
What is the main purpose of microcontrollers?
What is the main purpose of microcontrollers?
Signup and view all the answers
In what context are supercomputers primarily used?
In what context are supercomputers primarily used?
Signup and view all the answers
Which computer system is best suited for purposes like gaming and animation?
Which computer system is best suited for purposes like gaming and animation?
Signup and view all the answers
Which characteristic best describes a mainframe computer?
Which characteristic best describes a mainframe computer?
Signup and view all the answers
Which of the following statements is true regarding modern supercomputers?
Which of the following statements is true regarding modern supercomputers?
Signup and view all the answers
Which device is an example of a compact, purpose-built computer?
Which device is an example of a compact, purpose-built computer?
Signup and view all the answers
What is one primary difference between microcontrollers (MCUs) and microprocessors?
What is one primary difference between microcontrollers (MCUs) and microprocessors?
Signup and view all the answers
How do Harvard architecture and Neumann architecture differ in terms of instruction execution?
How do Harvard architecture and Neumann architecture differ in terms of instruction execution?
Signup and view all the answers
Which of the following best describes a System on a Chip (SoC)?
Which of the following best describes a System on a Chip (SoC)?
Signup and view all the answers
What role does the CPU play in a computer system?
What role does the CPU play in a computer system?
Signup and view all the answers
What is a common application of artificial intelligence in consumer technology?
What is a common application of artificial intelligence in consumer technology?
Signup and view all the answers
Which statement is true about the memory used in microcontrollers?
Which statement is true about the memory used in microcontrollers?
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?
In the context of execution cycles, what happens during the first cycle of instruction execution in a Harvard architecture?
Signup and view all the answers
Why are microcontrollers considered economical for device management?
Why are microcontrollers considered economical for device management?
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.
Related Documents
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.