This document contains the questions and programs for a computer science practical assignment. It asks the student to write 10 programs that perform bitwise operations and conversions on binary numbers, including converting between radix, bit shifting, bitwise logical operations, one's and two's complement, an up-down counter, and bitwise addition, subtraction, and logical operations using selective set, clear, and complement. Each question provides the name of the operation and requires the student to write the program to implement it along with sample output.
This document contains the questions and programs for a computer science practical assignment. It asks the student to write 10 programs that perform bitwise operations and conversions on binary numbers, including converting between radix, bit shifting, bitwise logical operations, one's and two's complement, an up-down counter, and bitwise addition, subtraction, and logical operations using selective set, clear, and complement. Each question provides the name of the operation and requires the student to write the program to implement it along with sample output.
This document contains the questions and programs for a computer science practical assignment. It asks the student to write 10 programs that perform bitwise operations and conversions on binary numbers, including converting between radix, bit shifting, bitwise logical operations, one's and two's complement, an up-down counter, and bitwise addition, subtraction, and logical operations using selective set, clear, and complement. Each question provides the name of the operation and requires the student to write the program to implement it along with sample output.
This document contains the questions and programs for a computer science practical assignment. It asks the student to write 10 programs that perform bitwise operations and conversions on binary numbers, including converting between radix, bit shifting, bitwise logical operations, one's and two's complement, an up-down counter, and bitwise addition, subtraction, and logical operations using selective set, clear, and complement. Each question provides the name of the operation and requires the student to write the program to implement it along with sample output.
College rollno. – APS21099 Exam rollno. – 21048582006 Course – BSc physical science with computer science Semester – IV Subject – Computer System Architecture Q1:- Write a program to convert an unsigned number in one radix ‘A’ to the equivalent number in another radix ‘B’, where A and B can be any positive integer. • Program:- Output:- Q2:- Write a program that will prompt for the input of two integer values. Then using the Bitwise shift operators show the result of (a) Left shifting the first number by the second. Program:- Output:- (b) Right shifting the first number by the second Program:- Output:- Q3:- Write a program that will prompt for the input of two integer values. Then using the logical operators show the result of (a) Exclusive OR of the first number by the second bitwise Program:- Output:- (b) OR of the first number by the second bitwise Program:- Output:- (c) AND of the first number by the second bitwise Program:- Output:- Q4:- Write a program that will prompt for the input of a binary value and print (a) One’s complement (b) Two’s complement Program:- Output:- Q5:- Write a program to print the values of a 5 bit binary up-down counter. User should be able to specify the up or down nature of the counter. Program:- Output:- Q6:- Write a program to implement bit-wise addition of two numbers. Program:- Output:- Q7:- Write a program to implement bit-wise Subtraction of two numbers using 2’s complement. Program:- Output:- Q8:- Write a program to implement Selective Set logical operation using bit-wise operators. Program:- Output:- Q9:- Write a program to implement Selective Complement logical operation using bit-wise operators. Program:- Output:- Q10:- Write a program to implement Selective Clear logical operation using bit-wise operators. Program:- Output:-