Computer and Programming Topics
What is DOS? Write any 10 command of DOS
DOS stands for Disk Operating System. It is a command-line-based operating system that was
widely used before the rise of graphical operating systems like Windows. DOS allows users to
interact with the computer by typing text commands. It manages files, runs software, and controls
hardware resources.
10 Common DOS Commands:
1. DIR - Lists all files and folders in the current directory.
2. CD - Changes the directory (folder). Example: CD Documents
3. MD or MKDIR - Creates a new directory. Example: MD NewFolder
4. RD or RMDIR - Removes a directory. Example: RD OldFolder
5. COPY - Copies files from one location to another. Example: COPY file.txt D:\Backup
6. DEL - Deletes a file. Example: DEL file.txt
7. REN - Renames a file or folder. Example: REN old.txt new.txt
8. CLS - Clears the screen.
9. TYPE - Displays the contents of a text file. Example: TYPE notes.txt
10. EXIT - Exits the DOS command prompt.
Difference between machine and assembly language
Machine Language vs Assembly Language:
Machine language is the lowest-level programming language written in binary (0s and 1s). Assembly
language uses mnemonics or symbolic representations of machine instructions.
1. **Machine Language** is directly executed by the CPU, while **Assembly Language** requires an
assembler.
2. Machine Language is written in binary, Assembly uses mnemonics.
3. Machine Language is not human-readable; Assembly Language is more readable but still
low-level.
4. Machine Language is very fast in execution, while Assembly is slower due to translation.
5. Both are used for system-level programming, but Assembly is more manageable.
What is EBCDIC? Discuss with suitable example
EBCDIC stands for Extended Binary Coded Decimal Interchange Code. It is an 8-bit character
encoding system developed by IBM for use in its mainframe and midrange computer systems.
EBCDIC is used to represent letters, numbers, punctuation, and control characters in binary form so
that computers can process and store text.
Key Features:
1. Uses 8 bits, allowing up to 256 characters.
2. Mostly used in IBM mainframes and legacy systems.
3. Not compatible with ASCII, which is more commonly used in modern systems.
Example of EBCDIC Encoding:
Character: A, EBCDIC (Hex): C1, Binary: 1100 0001
Character: B, EBCDIC (Hex): C2, Binary: 1100 0010
Character: a, EBCDIC (Hex): 81, Binary: 1000 0001
Character: 1, EBCDIC (Hex): F1, Binary: 1111 0001
Character: Space, EBCDIC (Hex): 40, Binary: 0100 0000
A system running on IBM mainframe might store the string 'AB1' in EBCDIC as C1 C2 F1.