Computer Science Practical File APS21099-2 PDF

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 17

Computer science practical assignment

Name – ABHISHEK ATEL


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:-

You might also like