Group C Assign 23
Group C Assign 23
Title:
Write C++ program for storing binary number using doubly linked lists. Write
functions
a) to compute 1‘s and 2‘s complement
b) add two binary numbers
Marks: Sign:
Group B
Assignment no 3
Title: (write)
Write C++ program for storing binary number using doubly linked lists. Write functions
a) to compute 1‘s and 2‘s complement
b) add two binary numbers
Index terms: Binary Numbers, Doubly linked list
Theory:
A Doubly Linked List (DLL) contains an extra pointer, typically called previous pointer,
together with next pointer and data which are there in singly linked list.
1’s complement of a binary number is another binary number obtained by toggling all bits in
it, i.e., transforming the 0 bit to 1 and the 1 bit to 0.
Examples:
2’s complement of a binary number is 1 added to the 1’s complement of the binary number.
Examples:
Conclusion(write)
Questions(write)