[go: up one dir, main page]

0% found this document useful (0 votes)
10 views1 page

XI Numbers Assignment 1

Uploaded by

qwert
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
10 views1 page

XI Numbers Assignment 1

Uploaded by

qwert
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

Class – XI

NUMBERS
ASSIGNMENT – 1
1. Convert the following as per instruction:
a) (485)10 = (?)2 (without using repetitive division method)
b (175.25)10 = (?)8
c) (42.50)10 = (?)16
d) (111000.101)2 = (?)16 (using shortcut method)
e) (A7D5)16 = (?)2 (using shortcut method)
f) (77.27)8 = (?)10
g) (BAD.25)16 = (?)8 (using shortcut method)
h) (CAB.CC2)16 = (?)2 (using shortcut method)
2. Binary Addition:
a) (10011.01)2 + (11.101)2 + (110.0101)2 = (?)2
b) (1.001)2 + (101.01)2 + (1001.11)2 = (?)2
3. Find out 1's complement & 2's complement of the following binary numbers:
a) (10001.01)2
b) (1011001100)2
4. Write a program in Java to accept a binary number and convert the number in
equivalent decimal and hexadecimal form & display the result with a proper message.
Class Name: Base_convert
Instance Variable: int b : to store the binary number
int dec : to store the decimal number
String hex : to store the hexadecimal number
Instance Method: Base_convert( ) : default constructor to initialize all the data
members of the class with their default values.
int B2D ( int b) : to convert the binary number to its equivalent decimal form without
iteration and return the decimal form.
void D2H (int dec) : to convert the decimal number to its equivalent hexadecimal form
using iteration and finally display the result with a proper message.

Write a main ( ) method to call the above methods using an object to perform the task.

You might also like