Convert Decimal to Octal
Duration: 3 min
This video lesson is available to enrolled students.
Inside: a video lesson and guided study material.
Module outline
- Quantitative Aptitude: Number System, Divisibility Rules, HCF LCM, Percentage, Ratio and Proportion (Ratios), Average, Profit and Loss, Simple Interest and Compound Interest, Mixture and Alligation, Partnership, Age Problems, Time and Work, Pipe and Cistern, Speed Time and Distance, Algebra, Arithmetic, Data Interpretation, Sequence and Series (Series), Logarithm, Powers and Exponents (Surds and Indices), Permutation and Combination, Probability, Speed Mathematics and Basic Mathematics, Trigonometry
- Logical Reasoning: Coding Decoding, Blood Relations, Directions (Direction Test), Ranking, Order and Sequence, Seating Arrangements, Puzzle Solving (Puzzles), Data Arrangement, Syllogisms, Inequality, Data Sufficiency, Deductive and Inductive Reasoning (Logical Deduction and Induction) (Prepositional Reasoning), Series (Number and Letter Series) (Numerical Relations and Reasoning), Venn Diagram, Logical Sequence Of Words, Calendar, Clock, Cubes & Dices, Non Verbal Reasoning (Spatial Aptitude) (Spatial Reasoning) (Visual Reasoning)
- Verbal Ability: Noun, Pronoun, Adjectives, Verb, Adverb, Tenses, Subject Verb Agreement (Verb Noun Agreement), Articles, Preposition, Conjunction, Modals, Determiner, Vocabulary, Comprehension / Reading Comprehension / Unseen Passages (Critical Reasoning) (Paragraph Questions), Cloze Test (Cloze Passage), Sentence Correction (Error Correction), Sentence Completion (Fill in the blanks), Sentence Re-arrangements (Para Jumbles) (Narrative Sequencing), Active Passive Voice (Voice), Direct and Indirect Speech, Sentence Construction
- Data Structures (Domain Test): Introduction to DS, Array, Stack, Queue, Linked List, Tree, Graphs, Hashing
- Algorithms (Domain Test):
- OOPs (Domain Test): Object Oriented Programming (OOPS)
- DBMS (Domain Test): Basics of DBMS, ER Diagram, Relational Model & Functional Dependencies, Keys & Integrity Constraints, Normalization (1NF - BCNF), Decomposition Properties & 4NF, File Organization & Indexing, Relational Algebra, Relational Calculus, Transaction Management, Concurrency Control, Database Recovery, ORDBMS, Database Security & Authorization, Query Processing & Optimization, Enhanced Data Models, Data Warehousing & Mining, Big Data Systems, NoSQL
- SQL (Domain Test): SQL
- Operating Systems (Domain Test): Introduction to OS, Process Management, CPU Scheduling, Process Synchronization, Deadlock, Threads & Process Creation, Memory Management, Virtual Memory, Disc Scheduling, File Management, Windows OS, Linux OS, Security, Distributed Systems, Virtual Machines
- Computer Networks (Domain Test): Introduction to CN, Data Communication, DLL: Access Control, DLL: Flow Control, DLL: Error Control, DLL: Framing, Data Link Layer - Ethernet, Net Layer: IPv4 & Proto, Net Layer: IP Addressing, Net Layer:Routing Protocol, Transport Layer Services, TL: Congestion & UDP, Application Layer, Hardware basics, Network Security, Cloud Computing and IoT, Cyber and Info Security
- Coding: Coding Questions by Yash Sir, C Programming by Yash Sir, Programming in C++, Java, Python for Placements by Yash Sir
- Written English Test: English Writing Ability
- Psychometric Test: Behavioral Assessment (Behavioral Competency Profiling) (Psychometric Test)
AI summary & chapters
AI Summary
An AI-generated summary of this video lecture.
This video is a programming tutorial from Knowledge Gate that teaches how to convert a decimal number to an octal number. The lesson begins with an introduction to the problem, which is to write a C program to convert a decimal number to octal. The instructor first explains the manual conversion process using the division-by-8 method, demonstrating it with the decimal number 33, which results in the octal number 41. The video then transitions to the coding part, where the instructor displays a C program. The code uses a loop to repeatedly divide the input number by 8, collecting the remainders to form the octal number. The instructor walks through the code, explaining the logic and variables, and demonstrates the step-by-step calculation of the octal equivalent of 33, showing how the final result is built digit by digit.
Chapters
0:00 – 2:00 00:00-02:00
The video starts with the Knowledge Gate logo, followed by a slide showing the company's various educational offerings. The main content begins with a PowerPoint presentation titled 'Q2: Write a program to convert Decimal to Octal'. The instructor, identified as a 'Placement Expert', introduces the topic. The screen then displays a diagram under the heading 'Logic' that illustrates the manual conversion of the decimal number 33 to octal. The process involves dividing 33 by 8, which gives a quotient of 4 and a remainder of 1. Then, 4 is divided by 8, giving a quotient of 0 and a remainder of 4. The remainders are read in reverse order to get the octal number 41. The instructor explains this logic, emphasizing the division-by-8 method.
2:00 – 2:41 02:00-02:41
The video transitions to the 'Code' section, where a C program is displayed on the screen. The code includes the standard header file, a main function, and variables for the input number (n), a temporary variable (dn), a variable to store the octal result (binno), and loop counters (i, j). The program uses a for loop to repeatedly divide the number by 8. The instructor explains the logic, noting that the remainder of each division (n%8) is added to the result (binno) after being multiplied by a power of 10 (i). The variable 'i' is multiplied by 10 in each iteration to shift the place value. The instructor demonstrates the calculation step-by-step, showing that for n=33, the first iteration gives a remainder of 1, which is added to binno (0 + 1*1 = 1). The second iteration gives a remainder of 4, which is added to binno (1 + 4*10 = 41). The final printf statement outputs the result, confirming the octal of 33 is 41.
The video provides a comprehensive, step-by-step tutorial on converting a decimal number to octal, covering both the theoretical logic and its practical implementation in C. It begins with a clear explanation of the manual division method, using a worked example to build understanding. This foundational knowledge is then directly applied to the programming solution. The instructor bridges the gap between the algorithm and the code by walking through the C program, explaining each line and variable, and demonstrating the calculation process. This approach ensures that students not only learn the code but also understand the underlying mathematical principle, making the lesson effective for both beginners and those looking to solidify their programming fundamentals.

