The document discusses various number systems used in digital computers including binary, decimal, octal, and hexadecimal. It provides details on:
1) How numbers are represented positionally in these systems, with different radixes (bases) and the meaning of each digit based on its position.
2) Methods for converting between the different number systems, such as dividing the number by the new base and writing the remainders in reverse order.
3) The steps to convert a decimal number to its binary, octal or hexadecimal equivalent and vice versa by calculating the place values of each digit.
The document discusses the binary number system and how to convert between binary, decimal, octal, and hexadecimal numbers. It also covers binary-coded decimal (BCD). The binary system uses only two digits, 0 and 1. To convert a decimal number to binary, you divide the decimal by 2 and write down the remainders in reverse order. Octal and hexadecimal break binary down into groups of 3 and 4 digits respectively to make large binary numbers easier to read and enter. BCD represents each decimal digit with a 4-bit code to allow easy conversion between decimal and binary.
Computers represent data using binary digits (bits) that can have a value of 0 or 1. Data is stored digitally as patterns of bits. Different numbering systems like binary, decimal, and hexadecimal use different symbols but the same positional notation approach. Converting between numbering systems involves repeatedly dividing the number by the base and recording the remainders as the digits of the new number.
This document introduces group members Md. Ilias Bappi and Md.Kawsar Hamid and presents information on number systems and conversions. It discusses the decimal number system and defines ones' complement and twos' complement in binary. It provides examples of converting between binary, decimal, octal, and hexadecimal systems using appropriate techniques like multiplying bit positions by powers of the base. Conversions include binary to decimal, octal to decimal, hexadecimal to decimal, decimal to binary, octal to binary, hexadecimal to binary, decimal to octal, octal to hexadecimal, and binary to decimal representations of fractions.
This document defines and classifies different types of binary codes. It explains that binary codes represent numeric and alphanumeric data as groups of bits. Binary codes are classified as weighted or non-weighted, reflective or non-reflective, and sequential or non-sequential. Common binary codes include ASCII, EBCDIC, Hollerith, BCD, excess-3, and Gray codes. Error detecting and correcting codes are also discussed which add extra bits to detect or correct errors during data transmission. Examples of different binary codes are provided.
Constants are values that do not change during program execution and include numeric constants like integers and floating point numbers, as well as string or character constants. Variables are identifiers that are used to refer to values that can change during program execution. Common variable types in C include integers, floating point numbers, characters, and strings. Variables must be declared with a data type before being assigned values and have naming conventions like starting with a letter and being less than 32 characters.
George Boole published "An Investigation into the Laws of Thought" in 1854, outlining a system of logic and algebraic language dealing with true and false values. This became known as Boolean logic. Boolean logic uses only true and false values and the basic operations are AND, OR, and NOT. Boolean logic is the basis for modern computing, as electronic circuits can represent Boolean operations using gates. Circuits called AND, OR, and NOT gates perform the corresponding logical operations and form the building blocks for digital logic.
This document defines and provides examples of different types of operators in C programming. It discusses arithmetic, relational, logical, assignment, increment/decrement, conditional, bitwise, and special operators. For each type of operator it provides the syntax, example uses, and meaning. It also gives examples to illustrate the differences between prefix and postfix increment/decrement operators.
Digital logic design deals with digital circuits and how to design digital hardware using logic gates. It involves working with binary and other number systems. Binary represents information using two states (0 and 1) which can be represented electrically using voltage levels. Converting between number systems like binary, decimal, and octal allows digital components to interface. Basic logic operations like addition, subtraction and multiplication can then be performed on binary numbers.
The document discusses the binary number system and how to convert between binary, decimal, octal, and hexadecimal numbers. It also covers binary-coded decimal (BCD). The binary system uses only two digits, 0 and 1. To convert a decimal number to binary, you divide the decimal by 2 and write down the remainders in reverse order. Octal and hexadecimal break binary down into groups of 3 and 4 digits respectively to make large binary numbers easier to read and enter. BCD represents each decimal digit with a 4-bit code to allow easy conversion between decimal and binary.
Computers represent data using binary digits (bits) that can have a value of 0 or 1. Data is stored digitally as patterns of bits. Different numbering systems like binary, decimal, and hexadecimal use different symbols but the same positional notation approach. Converting between numbering systems involves repeatedly dividing the number by the base and recording the remainders as the digits of the new number.
This document introduces group members Md. Ilias Bappi and Md.Kawsar Hamid and presents information on number systems and conversions. It discusses the decimal number system and defines ones' complement and twos' complement in binary. It provides examples of converting between binary, decimal, octal, and hexadecimal systems using appropriate techniques like multiplying bit positions by powers of the base. Conversions include binary to decimal, octal to decimal, hexadecimal to decimal, decimal to binary, octal to binary, hexadecimal to binary, decimal to octal, octal to hexadecimal, and binary to decimal representations of fractions.
This document defines and classifies different types of binary codes. It explains that binary codes represent numeric and alphanumeric data as groups of bits. Binary codes are classified as weighted or non-weighted, reflective or non-reflective, and sequential or non-sequential. Common binary codes include ASCII, EBCDIC, Hollerith, BCD, excess-3, and Gray codes. Error detecting and correcting codes are also discussed which add extra bits to detect or correct errors during data transmission. Examples of different binary codes are provided.
Constants are values that do not change during program execution and include numeric constants like integers and floating point numbers, as well as string or character constants. Variables are identifiers that are used to refer to values that can change during program execution. Common variable types in C include integers, floating point numbers, characters, and strings. Variables must be declared with a data type before being assigned values and have naming conventions like starting with a letter and being less than 32 characters.
George Boole published "An Investigation into the Laws of Thought" in 1854, outlining a system of logic and algebraic language dealing with true and false values. This became known as Boolean logic. Boolean logic uses only true and false values and the basic operations are AND, OR, and NOT. Boolean logic is the basis for modern computing, as electronic circuits can represent Boolean operations using gates. Circuits called AND, OR, and NOT gates perform the corresponding logical operations and form the building blocks for digital logic.
This document defines and provides examples of different types of operators in C programming. It discusses arithmetic, relational, logical, assignment, increment/decrement, conditional, bitwise, and special operators. For each type of operator it provides the syntax, example uses, and meaning. It also gives examples to illustrate the differences between prefix and postfix increment/decrement operators.
Digital logic design deals with digital circuits and how to design digital hardware using logic gates. It involves working with binary and other number systems. Binary represents information using two states (0 and 1) which can be represented electrically using voltage levels. Converting between number systems like binary, decimal, and octal allows digital components to interface. Basic logic operations like addition, subtraction and multiplication can then be performed on binary numbers.
Digital Electronics- Number systems & codes VandanaPagar1
This document covers number systems including decimal, binary, hexadecimal and their representations. It discusses how to convert between different number bases including binary to decimal and hexadecimal to decimal. Binary operations like addition, subtraction and codes like binary coded decimal are explained. Non-weighted codes such as gray code are also introduced. Reference books on digital electronics and number systems are provided.
The document discusses encoders, decoders, multiplexers (MUX), and how they can be used to implement digital logic functions. It provides examples of using 4-to-1, 8-to-1 and 10-to-1 MUX to implement functions. It also gives examples of 4-to-2, 8-to-3 and 10-to-4 encoders. Decoder examples include a 2-to-4 and 3-to-8 binary decoder. The document explains how decoders can be used as logic building blocks to realize Boolean functions. It poses questions to be answered using terms like MUX, DEMUX, encoder, decoder.
Digital computers operate on data expressed in binary digits (0s and 1s). They are highly accurate and fast. Microcomputers are single-user computers like desktops, laptops, and PDAs. Mini computers have more storage and memory than microcomputers and support multiple users. Mainframe computers are the largest and most powerful, able to support hundreds of users and handle massive amounts of data processing. Supercomputers use parallel processing with multiple coordinated processors and are used for highly complex tasks like weather modeling.
The document discusses different number systems including decimal, binary, octal, and hexadecimal. It explains how to represent numbers in these different bases and how to convert between them. The key techniques covered include multiplying place values to convert to and from decimal, grouping bits into sets of 3 or 4 to convert between binary and octal or hexadecimal, and using binary as an intermediate step to convert between non-binary bases. Examples are provided for adding, multiplying, and converting fractions between decimal and binary representations.
This document discusses various coding schemes including:
- Binary coded decimal (BCD) which assigns a weight to each digit position to represent decimal numbers. Other positively weighted codes and negatively weighted codes are also discussed.
- Gray code which minimizes the number of bit changes between adjacent values represented. This is useful for applications like thumbwheels.
- Character encoding standards like ASCII, EBCDIC, and Unicode which can represent larger character sets with more bits per character.
- Floating point number representation with sign, exponent and mantissa fields.
This document discusses different methods for representing data in computers, including numeric and character representations. It covers representing signed and unsigned integers using methods like sign-magnitude, 1's complement, and 2's complement. It also discusses floating point number representation using the IEEE standard. Finally, it discusses character representation using ASCII and Unicode encoding schemes.
A numeral system (or system of numeration) is a writing system for expressing numbers; that is, a mathematical notation for representing numbers of a given set, using digits or other symbols in a consistent manner. It can be seen as the context that allows the symbols "11" to be interpreted as the binary symbol for three, the decimal symbol for eleven, or a symbol for other numbers in different bases.
A combinational circuit is a logic circuit whose output is solely determined by the present input. It has no internal memory and its output depends only on the current inputs. A half adder is a basic combinational circuit that adds two single bits and produces a sum and carry output. A full adder adds three bits and produces a sum and carry like the half adder. Other combinational circuits discussed include half and full subtractors, decoders, encoders, and priority encoders.
1) The document discusses different types of micro-operations including arithmetic, logic, shift, and register transfer micro-operations.
2) It provides examples of common arithmetic operations like addition, subtraction, increment, and decrement. It also describes logic operations like AND, OR, XOR, and complement.
3) Shift micro-operations include logical shifts, circular shifts, and arithmetic shifts which affect the serial input differently.
The presentation given at MSBTE sponsored content updating program on 'PC Maintenance and Troubleshooting' for Diploma Engineering teachers of Maharashtra. Venue: Government Polytechnic, Nashik Date: 17/01/2011 Session-2: Computer Organization and Architecture.
The document discusses instruction set architecture (ISA), which is part of computer architecture related to programming. It defines the native data types, instructions, registers, addressing modes, and other low-level aspects of a computer's operation. Well-known ISAs include x86, ARM, MIPS, and RISC. A good ISA lasts through many implementations, supports a variety of uses, and provides convenient functions while permitting efficient implementation. Assembly language is used to program at the level of an ISA's registers, instructions, and execution order.
This document discusses decoders and encoders. It defines a decoder as a circuit that accepts a binary input and activates only one output corresponding to the input. An encoder is the inverse, converting an active input to a coded output. Various types of decoders and encoders are described, including 2-to-4 decoders, 3-to-8 decoders, priority encoders, decimal-to-BCD encoders, and octal-to-binary encoders. Truth tables and logic diagrams are provided as examples. Expansion of decoders using multiple lower-order decoders is also covered.
This document discusses digital subtractors. It defines a subtractor as an electronic logic circuit that calculates the difference between two binary numbers. There are two main types: half subtractors and full subtractors. A half subtractor is used for single bit subtraction and has two inputs, two outputs, and a truth table. A full subtractor can subtract three single bit numbers, with three inputs and two outputs defined by its truth table. Parallel binary subtractors are built by cascading multiple full subtractors to subtract larger binary numbers. Subtractors have applications in signal processing, arithmetic logic units, address calculation, and more.
The control unit is responsible for controlling the flow of data and operations in a computer. It generates timing and control signals to coordinate the arithmetic logic unit, memory, and other components. Control units can be implemented using either hardwired or microprogrammed logic. A hardwired control unit uses combinational logic circuits like gates and flip-flops to directly generate control signals, while a microprogrammed control unit stores control sequences as microprograms in a control memory and executes them step-by-step using microinstructions. Both approaches have advantages and disadvantages related to speed, flexibility, cost, and complexity of implementation.
1. The document discusses different methods of representing numeric and non-numeric data in computers, including numeric systems like binary, octal, hexadecimal, and different representations of fixed-point and floating-point numbers.
2. It covers topics like signed number representations using signed magnitude, 1's complement, and 2's complement, and describes how arithmetic operations like addition and subtraction are performed using these methods.
3. Floating-point number representation is also discussed, where numbers are represented in the form of a sign, mantissa, and exponent to allow for a wider range of values.
This document provides an overview of constants, variables, and data types in the C programming language. It discusses the different categories of characters used in C, C tokens including keywords, identifiers, constants, strings, special symbols, and operators. It also covers rules for identifiers and variables, integer constants, real constants, single character constants, string constants, and backslash character constants. Finally, it describes the primary data types in C including integer, character, floating point, double, and void, as well as integer, floating point, and character types.
Booth's multiplication algorithm was invented by Andrew D. Booth in 1951 while studying crystallography at Birkbeck College in London. It improves the speed of computer multiplication by reducing the number of additions or subtractions needed. The algorithm uses a grid with the multiplicand in the top row, the negative multiplicand in the middle row, and the multiplier in the bottom row. It then iteratively shifts and adds or subtracts based on the last two bits of the product to build up the final result in fewer steps than standard addition methods. Several examples are provided to demonstrate how the algorithm works.
ROM(Read Only Memory ) is computer memory on which data has been prerecorded. Once data has been written onto a ROM chip, it cannot be removed and can only be read.
Digital computers represent data by means of an easily identified symbol called a digit. The data may
contain digits, alphabets or special character, which are converted to bits, understandable by the computer.
In Digital Computer, data and instructions are stored in computer memory using binary code (or
machine code) represented by Binary digIT’s 1 and 0 called BIT’s.
The number system uses well-defined symbols called digits.
Number systems are classified into two types:
o Non-positional number system
o Positional number system
The document discusses different number systems and digital coding techniques. It describes the decimal, binary, octal and hexadecimal number systems. Conversion methods between these systems are provided, including complement representations. Common codes like binary coded decimal, excess-3, and gray codes are defined along with their properties. NAND and NOR gates are identified as universal gates that can be used to implement any logical function. Methods for constructing common logic gates using only NAND gates are presented.
Digital Electronics- Number systems & codes VandanaPagar1
This document covers number systems including decimal, binary, hexadecimal and their representations. It discusses how to convert between different number bases including binary to decimal and hexadecimal to decimal. Binary operations like addition, subtraction and codes like binary coded decimal are explained. Non-weighted codes such as gray code are also introduced. Reference books on digital electronics and number systems are provided.
The document discusses encoders, decoders, multiplexers (MUX), and how they can be used to implement digital logic functions. It provides examples of using 4-to-1, 8-to-1 and 10-to-1 MUX to implement functions. It also gives examples of 4-to-2, 8-to-3 and 10-to-4 encoders. Decoder examples include a 2-to-4 and 3-to-8 binary decoder. The document explains how decoders can be used as logic building blocks to realize Boolean functions. It poses questions to be answered using terms like MUX, DEMUX, encoder, decoder.
Digital computers operate on data expressed in binary digits (0s and 1s). They are highly accurate and fast. Microcomputers are single-user computers like desktops, laptops, and PDAs. Mini computers have more storage and memory than microcomputers and support multiple users. Mainframe computers are the largest and most powerful, able to support hundreds of users and handle massive amounts of data processing. Supercomputers use parallel processing with multiple coordinated processors and are used for highly complex tasks like weather modeling.
The document discusses different number systems including decimal, binary, octal, and hexadecimal. It explains how to represent numbers in these different bases and how to convert between them. The key techniques covered include multiplying place values to convert to and from decimal, grouping bits into sets of 3 or 4 to convert between binary and octal or hexadecimal, and using binary as an intermediate step to convert between non-binary bases. Examples are provided for adding, multiplying, and converting fractions between decimal and binary representations.
This document discusses various coding schemes including:
- Binary coded decimal (BCD) which assigns a weight to each digit position to represent decimal numbers. Other positively weighted codes and negatively weighted codes are also discussed.
- Gray code which minimizes the number of bit changes between adjacent values represented. This is useful for applications like thumbwheels.
- Character encoding standards like ASCII, EBCDIC, and Unicode which can represent larger character sets with more bits per character.
- Floating point number representation with sign, exponent and mantissa fields.
This document discusses different methods for representing data in computers, including numeric and character representations. It covers representing signed and unsigned integers using methods like sign-magnitude, 1's complement, and 2's complement. It also discusses floating point number representation using the IEEE standard. Finally, it discusses character representation using ASCII and Unicode encoding schemes.
A numeral system (or system of numeration) is a writing system for expressing numbers; that is, a mathematical notation for representing numbers of a given set, using digits or other symbols in a consistent manner. It can be seen as the context that allows the symbols "11" to be interpreted as the binary symbol for three, the decimal symbol for eleven, or a symbol for other numbers in different bases.
A combinational circuit is a logic circuit whose output is solely determined by the present input. It has no internal memory and its output depends only on the current inputs. A half adder is a basic combinational circuit that adds two single bits and produces a sum and carry output. A full adder adds three bits and produces a sum and carry like the half adder. Other combinational circuits discussed include half and full subtractors, decoders, encoders, and priority encoders.
1) The document discusses different types of micro-operations including arithmetic, logic, shift, and register transfer micro-operations.
2) It provides examples of common arithmetic operations like addition, subtraction, increment, and decrement. It also describes logic operations like AND, OR, XOR, and complement.
3) Shift micro-operations include logical shifts, circular shifts, and arithmetic shifts which affect the serial input differently.
The presentation given at MSBTE sponsored content updating program on 'PC Maintenance and Troubleshooting' for Diploma Engineering teachers of Maharashtra. Venue: Government Polytechnic, Nashik Date: 17/01/2011 Session-2: Computer Organization and Architecture.
The document discusses instruction set architecture (ISA), which is part of computer architecture related to programming. It defines the native data types, instructions, registers, addressing modes, and other low-level aspects of a computer's operation. Well-known ISAs include x86, ARM, MIPS, and RISC. A good ISA lasts through many implementations, supports a variety of uses, and provides convenient functions while permitting efficient implementation. Assembly language is used to program at the level of an ISA's registers, instructions, and execution order.
This document discusses decoders and encoders. It defines a decoder as a circuit that accepts a binary input and activates only one output corresponding to the input. An encoder is the inverse, converting an active input to a coded output. Various types of decoders and encoders are described, including 2-to-4 decoders, 3-to-8 decoders, priority encoders, decimal-to-BCD encoders, and octal-to-binary encoders. Truth tables and logic diagrams are provided as examples. Expansion of decoders using multiple lower-order decoders is also covered.
This document discusses digital subtractors. It defines a subtractor as an electronic logic circuit that calculates the difference between two binary numbers. There are two main types: half subtractors and full subtractors. A half subtractor is used for single bit subtraction and has two inputs, two outputs, and a truth table. A full subtractor can subtract three single bit numbers, with three inputs and two outputs defined by its truth table. Parallel binary subtractors are built by cascading multiple full subtractors to subtract larger binary numbers. Subtractors have applications in signal processing, arithmetic logic units, address calculation, and more.
The control unit is responsible for controlling the flow of data and operations in a computer. It generates timing and control signals to coordinate the arithmetic logic unit, memory, and other components. Control units can be implemented using either hardwired or microprogrammed logic. A hardwired control unit uses combinational logic circuits like gates and flip-flops to directly generate control signals, while a microprogrammed control unit stores control sequences as microprograms in a control memory and executes them step-by-step using microinstructions. Both approaches have advantages and disadvantages related to speed, flexibility, cost, and complexity of implementation.
1. The document discusses different methods of representing numeric and non-numeric data in computers, including numeric systems like binary, octal, hexadecimal, and different representations of fixed-point and floating-point numbers.
2. It covers topics like signed number representations using signed magnitude, 1's complement, and 2's complement, and describes how arithmetic operations like addition and subtraction are performed using these methods.
3. Floating-point number representation is also discussed, where numbers are represented in the form of a sign, mantissa, and exponent to allow for a wider range of values.
This document provides an overview of constants, variables, and data types in the C programming language. It discusses the different categories of characters used in C, C tokens including keywords, identifiers, constants, strings, special symbols, and operators. It also covers rules for identifiers and variables, integer constants, real constants, single character constants, string constants, and backslash character constants. Finally, it describes the primary data types in C including integer, character, floating point, double, and void, as well as integer, floating point, and character types.
Booth's multiplication algorithm was invented by Andrew D. Booth in 1951 while studying crystallography at Birkbeck College in London. It improves the speed of computer multiplication by reducing the number of additions or subtractions needed. The algorithm uses a grid with the multiplicand in the top row, the negative multiplicand in the middle row, and the multiplier in the bottom row. It then iteratively shifts and adds or subtracts based on the last two bits of the product to build up the final result in fewer steps than standard addition methods. Several examples are provided to demonstrate how the algorithm works.
ROM(Read Only Memory ) is computer memory on which data has been prerecorded. Once data has been written onto a ROM chip, it cannot be removed and can only be read.
Digital computers represent data by means of an easily identified symbol called a digit. The data may
contain digits, alphabets or special character, which are converted to bits, understandable by the computer.
In Digital Computer, data and instructions are stored in computer memory using binary code (or
machine code) represented by Binary digIT’s 1 and 0 called BIT’s.
The number system uses well-defined symbols called digits.
Number systems are classified into two types:
o Non-positional number system
o Positional number system
The document discusses different number systems and digital coding techniques. It describes the decimal, binary, octal and hexadecimal number systems. Conversion methods between these systems are provided, including complement representations. Common codes like binary coded decimal, excess-3, and gray codes are defined along with their properties. NAND and NOR gates are identified as universal gates that can be used to implement any logical function. Methods for constructing common logic gates using only NAND gates are presented.
The document discusses different number systems and digital logic concepts. It describes the decimal, binary, octal and hexadecimal number systems. It also covers number system conversions, signed and complement representations, coding systems like BCD and Gray code, and universal gates like NAND and NOR gates. All digital circuits are ultimately based on the binary number system and these fundamental concepts.
This document discusses different number systems used in digital computers and their conversions. It begins with an introduction to digital number systems and then describes the decimal, binary, octal and hexadecimal number systems. It explains how to represent integers and real numbers in binary. The document also covers number conversions between these systems using different methods like repeated division. Finally, it discusses various ways of representing integers in binary like sign-magnitude, one's complement and two's complement representations.
Number-Systems presentation of the mathematicsshivas379526
The document discusses different number systems including decimal, binary, hexadecimal, and their importance. It provides the following key points:
- Decimal is base-10 as it uses 10 digits (0-9). Binary is base-2 as it uses two digits, 0 and 1. Hexadecimal is base-16 as it uses 16 symbols (0-9 and A-F).
- Different number systems are important because computers use binary to simplify calculations and reduce circuitry/costs. Larger systems like hexadecimal are used to represent large memory addresses.
- Converting between systems involves placing the remainder of successive divisions by the base in each position. For example, converting 42 to binary is 101010 by dividing 42
This document presents an overview of different number systems including decimal, binary, octal, and hexadecimal. It defines each system, their bases, and the digits used. Conversion methods between the systems are described, such as repeated division to convert decimal to binary and multiplying place values to convert in the opposite direction. The relationships between the different bases are shown, including that hexadecimal represents groups of 4 binary digits. Examples are provided for conversions between the various number systems.
The document discusses various number systems including binary, decimal, octal, and hexadecimal. It provides explanations of how numbers are represented and converted between these number systems. The key points covered include:
- Definitions of different number systems and their bases
- How positional notation works in number systems
- Steps for converting numbers between decimal, binary, octal, and hexadecimal bases
- Examples of converting specific numbers between these number systems
The document discusses data representation in computer systems. It covers different number systems like binary, decimal, hexadecimal and their conversions. It explains how computers use the positional number system to represent numbers. It also discusses signed and unsigned integers, binary arithmetic operations, and character representation using ASCII code.
This document discusses different number systems including binary, decimal, octal, and hexadecimal. It provides details on each system such as their number bases and allowed digits. The document also describes how to convert between these different number systems using methods like dividing numbers by the target base or grouping binary digits into sets of four for hexadecimal conversion. The goal is to understand representation of numbers in computing systems which commonly use binary and hexadecimal formats.
This document provides an introduction to different digital number systems used in computer systems, including binary, decimal, octal, and hexadecimal. It discusses how each system uses different bases and symbols to represent numeric values. Conversion techniques between these number systems are also covered, along with signed and unsigned number representations, overflow detection, and other related topics. Key points covered include how each place value in a number represents different powers of the base, and how binary addition works with signed and unsigned numbers.
This document provides an introduction to digital number systems used in computer science. It discusses binary, decimal, octal, and hexadecimal number systems. For each system, it explains the base, digits used, and how to convert between the number systems and decimal. It also covers signed binary number representations, binary arithmetic, detecting overflow, and binary coded decimal. References are provided at the end for additional reading on number systems and computer data representation.
In digital computers, data is stored and represented using binary digits (bits) of 1s and 0s. There are different number systems that can represent numeric values, including binary, decimal, octal and hexadecimal. Each system has a base or radix, with binary having a base of 2, decimal 10, octal 8 and hexadecimal 16. Numbers can be converted between these systems using division and multiplication by the radix at each place value.
To Download this click on the link below:-
http://www29.zippyshare.com/v/42478054/file.html
Number System
Decimal Number System
Binary Number System
Why Binary?
Octal Number System
Hexadecimal Number System
Relationship between Hexadecimal, Octal, Decimal, and Binary
Number Conversions
This document discusses different number systems including decimal, binary, octal, and hexadecimal. It provides information on how each system works including the base and valid digits used. Conversion methods between the different systems are also described, such as using repeated division to convert decimal to binary and multiplying place values to convert in the opposite direction. The relationships between the number systems are examined, like how each hexadecimal digit represents 4 binary digits.
The document discusses different number systems including binary, decimal, octal, and hexadecimal. It explains that number systems denote the position and value of each digit. Binary uses two digits (0 and 1) while decimal uses ten digits (0 to 9). Octal uses eight digits (0 to 7) and hexadecimal uses sixteen digits (0 to 9 and A to F). The document then provides steps and examples for converting between these different number systems. It concludes that understanding number systems is crucial for working with computers and technology.
The document discusses different number systems used in digital computers including binary, decimal, octal, and hexadecimal systems. It describes the characteristics of each system such as the base and digits used. Methods for converting between these different number systems are presented, including using division or grouping bits. The representation of signed integers as binary numbers is also covered, comparing sign-magnitude, one's complement, and two's complement representations. Binary addition is demonstrated with examples.
This document discusses analog and digital electronics. It begins by explaining that analog electronics deals with continuous signals while digital electronics deals with discrete signals. It then discusses how digital techniques grew tremendously after 1938 when Claude Shannon systemized George Boole's theoretical work. Finally, it covers various number systems such as binary, decimal, octal, and hexadecimal and how to convert between them.
This document discusses number systems and conversions between number systems. It begins by introducing analog and digital electronics, and analog and digital signals. It then discusses different number systems including binary, decimal, octal and hexadecimal. The main methods covered are:
1) Converting a decimal number to binary, octal or hexadecimal using repeated division and noting the remainders.
2) Converting a binary, octal or hexadecimal number to decimal by multiplying each digit by its place value weight.
3) Conversions can also be done between binary and octal by grouping bits into groups of three.
This document discusses analog and digital electronics. It begins by explaining that analog electronics deals with continuous signals while digital electronics deals with discrete signals. It then discusses how digital techniques grew tremendously after 1938 when Claude Shannon systemized George Boole's theoretical work. Finally, it covers various number systems such as binary, decimal, octal, and hexadecimal and how to convert between them.
Software engineering is concerned with developing software using a systematic process and addressing factors like increasing demands and low expectations. It involves activities like specification, development, validation and evolution. Some key challenges are coping with diversity, reduced delivery times and developing trustworthy software. Different techniques are suitable depending on the type of system, and processes may incorporate elements of models like waterfall, incremental development and integration/configuration. Prototyping can help with requirements, design and testing.
The document provides an introduction to software engineering and discusses software, software engineering, the software development life cycle (SDLC), and SDLC models. It defines software and its components. It describes software engineering goals and challenges. It explains the SDLC phases including feasibility study, requirements analysis, design, development, testing, deployment, and maintenance. It discusses various SDLC models like waterfall, iterative, prototype, spiral, and agile models.
Software Engineering-Unit 2 "Requirement Engineering" by Adi.pdfProf. Dr. K. Adisesha
The document discusses requirement engineering and provides details on:
- Types of requirements including functional, non-functional, user, and system requirements
- The requirement engineering process including feasibility studies, elicitation, analysis, specification, validation, and management
- Software requirement specification (SRS) documents, their purpose, characteristics of a good SRS, and typical sections
- Functional and non-functional requirements in more depth
This document discusses system modeling. It defines system modeling as developing abstract models of a system from different perspectives. Common modeling techniques discussed include context models, interaction models, structural models, behavioral models, and model-driven engineering. Specific modeling languages covered are activity diagrams, use case diagrams, sequence diagrams, class diagrams, and state diagrams. The document provides examples and definitions for how to apply these modeling approaches and languages.
Architectural design establishes the framework for software development by examining requirements and designing a model that specifies system components, their inputs/outputs/functions, and interactions. It can be represented using structural, dynamic, process, functional, or framework models. The outputs are an architectural design document and various project plans. Architectural design decisions impact non-functional requirements and common decisions include architectural style and system decomposition.
The document discusses various types of software testing including unit testing, component testing, system testing, test-driven development, release testing, and user testing. It provides details on the goals and processes involved in each type of testing. Unit testing involves testing individual program units in isolation to check functionality. Component and system testing focus on interactions between units and components. Test-driven development interleaves writing tests before code. Release testing validates that software meets requirements before release. User testing involves customers providing input on a system under test.
This document discusses computer communication and networks. It defines data communication and its key characteristics of delivery, accuracy, timeliness and jitter. It describes the core components of a data communication system including the message, sender, receiver, transmission medium and protocols. It then discusses different types of computer networks including LANs, WANs, PANs and MANs. The key aspects covered are their definitions, examples, advantages and disadvantages.
Data communication involves the exchange of data between two devices via transmission media such as cables. It consists of five main components: a message, sender, receiver, transmission medium, and protocol. Data can be transmitted in three modes - simplex, half-duplex, and full-duplex. Transmission media can be guided (wired) such as twisted pair or coaxial cables, or unguided (wireless) such as radio waves. Networks are sets of connected devices that can be arranged in various topologies like bus, star, ring, or mesh. Switching techniques such as circuit, message, and packet switching determine how data is routed through a network.
The document discusses the data link layer. It covers the following key points:
- The data link layer has two sublayers: the logical link control (LLC) sublayer and the medium access control (MAC) sublayer.
- The LLC sublayer controls flow and performs error checking, while the MAC sublayer handles frame encapsulation and network addressing.
- The data link layer is responsible for framing, addressing, error control, flow control, and multi-access functionality. It takes packets and converts them to frames for transmission on the physical layer.
- Error detection techniques used include parity checks and cyclic redundancy checks to validate frames are transmitted accurately. Error correction can be done through retransmission
The document provides an overview of the network layer. It discusses key topics like the functions of the network layer such as logical addressing, routing, and internetworking. It describes different routing algorithms including distance vector, link state, and hierarchical routing. It also covers congestion control mechanisms like leaky bucket algorithm, token bucket algorithm, and admission control that are used to control congestion in the network layer.
The document discusses the transport and application layers of the OSI model. It begins by describing the transport layer, including its responsibilities of process-to-process delivery, end-to-end connections, multiplexing, congestion control, data integrity, error correction, and flow control. It then discusses the transport layer protocols TCP and UDP, comparing their key differences such as connection-oriented vs. connectionless and reliability. The document next covers application layer services and protocols, including DNS, HTTP, FTP, and email. It concludes by describing models like client-server and peer-to-peer that are used in application layer communication.
This document provides an introduction and overview of computer hardware components. It discusses input devices like keyboards, mice, scanners, and digital cameras. It also covers output devices such as monitors, printers, speakers. It describes different types of computers based on size and performance, such as microcomputers, minicomputers, and mainframes. The document then discusses computer memory, including primary memory technologies like RAM and ROM, as well as secondary magnetic storage.
This document provides an overview and introduction to the R programming language. It covers the history and development of R, which originated from the S language at Bell Labs in the 1970s. The document then outlines some key concepts in R including data structures, subsetting, control structures, functions, and debugging. It also discusses the design of the R system including its core functionality in base R and extensive library of additional packages.
The document discusses various government scholarship schemes in India and Karnataka for students. It outlines national schemes administered by ministries like Human Resource Development, Social Justice and Empowerment, Tribal Affairs and Minority Affairs. It also describes state-level schemes in Karnataka for SC/ST/OBC and minority students. Eligibility criteria include family income limits and minimum academic performance. The application process involves applying online through the National Scholarship Portal and State Scholarship Portal.
The document discusses various topics related to process management in operating systems, including:
1) A process is a program in execution that can be in different states like ready, running, waiting, or terminated. The OS uses a process control block to manage information for each process.
2) Processes communicate and synchronize access to shared resources using techniques like message passing and shared memory.
3) CPU scheduling algorithms like first-come first-served, shortest job next, priority, and round robin are used to allocate CPU time between ready processes.
This document provides an introduction to operating systems presented by Prof. K. Adisesha. It discusses key concepts of operating systems including definitions, functions, types, and properties. Specifically, it defines an operating system as an interface between the user and computer hardware. It describes functions such as processor management, memory management, and file management. It outlines different types of operating systems including batch, time-sharing, distributed, and real-time systems. Finally, it discusses properties like batch processing, multitasking, and distributed environments.
An operating system is an interface between a computer user and the computer hardware. The document discusses the key functions of operating systems including memory management, processor management, device management, file management, security, and more. It provides examples of popular operating systems like Linux, Windows, and describes different types of operating systems such as batch, time-sharing, distributed, network, and real-time operating systems.
This document provides an introduction to data structures using C. It discusses types of data structures like arrays, stacks, queues and linked lists. It explains that data structures allow for efficient organization and storage of data in memory based on relationships between elements. The document also covers topics like asymptotic analysis, best/worst/average case time complexities, big-O, omega and theta notations for analyzing algorithms. It provides characteristics of algorithms and data structures and examples of common data structure operations.
The document discusses object-oriented programming concepts in Java including classes, objects, inheritance, polymorphism, and more. It defines classes as templates for creating multiple object instances that share common properties. Objects are initialized through reference variables, methods, or constructors. The document also covers static methods, the this keyword, final keyword, arrays, strings, and other core OOP concepts in Java.
This document discusses Java graphics and input/output. It introduces the Graphics class in Java AWT which is used to draw on components. It describes various Graphics methods like drawString, drawRect. It also discusses AWT event handling and different event classes. Finally, it covers Java I/O streams like InputStream, OutputStream and file streams like FileInputStream and FileOutputStream along with methods to read and write from files.
The simplified electron and muon model, Oscillating Spacetime: The Foundation...RitikBhardwaj56
Discover the Simplified Electron and Muon Model: A New Wave-Based Approach to Understanding Particles delves into a groundbreaking theory that presents electrons and muons as rotating soliton waves within oscillating spacetime. Geared towards students, researchers, and science buffs, this book breaks down complex ideas into simple explanations. It covers topics such as electron waves, temporal dynamics, and the implications of this model on particle physics. With clear illustrations and easy-to-follow explanations, readers will gain a new outlook on the universe's fundamental nature.
This slide is special for master students (MIBS & MIFB) in UUM. Also useful for readers who are interested in the topic of contemporary Islamic banking.
Thinking of getting a dog? Be aware that breeds like Pit Bulls, Rottweilers, and German Shepherds can be loyal and dangerous. Proper training and socialization are crucial to preventing aggressive behaviors. Ensure safety by understanding their needs and always supervising interactions. Stay safe, and enjoy your furry friends!
This presentation includes basic of PCOS their pathology and treatment and also Ayurveda correlation of PCOS and Ayurvedic line of treatment mentioned in classics.
Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...Dr. Vinod Kumar Kanvaria
Exploiting Artificial Intelligence for Empowering Researchers and Faculty,
International FDP on Fundamentals of Research in Social Sciences
at Integral University, Lucknow, 06.06.2024
By Dr. Vinod Kumar Kanvaria
Physiology and chemistry of skin and pigmentation, hairs, scalp, lips and nail, Cleansing cream, Lotions, Face powders, Face packs, Lipsticks, Bath products, soaps and baby product,
Preparation and standardization of the following : Tonic, Bleaches, Dentifrices and Mouth washes & Tooth Pastes, Cosmetics for Nails.
This presentation was provided by Steph Pollock of The American Psychological Association’s Journals Program, and Damita Snow, of The American Society of Civil Engineers (ASCE), for the initial session of NISO's 2024 Training Series "DEIA in the Scholarly Landscape." Session One: 'Setting Expectations: a DEIA Primer,' was held June 6, 2024.
How to Manage Your Lost Opportunities in Odoo 17 CRMCeline George
Odoo 17 CRM allows us to track why we lose sales opportunities with "Lost Reasons." This helps analyze our sales process and identify areas for improvement. Here's how to configure lost reasons in Odoo 17 CRM
3. INTRODUCTION
Prof. K. Adisesha (Ph. D)
3
DATA REPRESENTATION:
In Digital Computer, data and instructions are stored in computer memory
using binary code (or machine code) represented by Binary digIT’s 1 and 0
called BIT’s.
The data may contain digits, alphabets or special character, which are
converted to bits, understandable by the computer.
The number system uses well defined symbols called digits.
5. DATA REPRESENTATION
Non-Positional Number System:
In olden days people use of this type of number system for simple calculations like
additions and subtractions.
The non-positional number system consists of different symbols that are used to
represent numbers.
Roman number system is an example of the non-positional number system i.e. I=1,
V=5, X=10, L=50.
This number system cannot be used effectively to perform arithmetic operations.
Prof. K. Adisesha (Ph. D)
5
6. DATA REPRESENTATION
Positional Number System:
This type of number system is used determine the quantity that the number
represents based on the position in which there are placed.
The total number of digits present in any number system is called its Base or
Radix.
Every number is represented by a base (or radix) x, which represents x digits.
The base is written after the number as subscript such as 512(10).It is a Decimal
number as its base is 10.
Prof. K. Adisesha (Ph. D)
6
7. DATA REPRESENTATION
Positional Number System:
The various types of number system are classified as:
Decimal number system
Binary number system
Octal number system
Hexadecimal number system
Prof. K. Adisesha (Ph. D)
7
8. Positional Number System
Decimal Number System:
It is the most widely used number system.
The decimal number system consists of 10 digits from 0 to 9.
It has 10 digits and hence its base or radix is 10.
These digits can be used to represent any numeric value.
Example: 123(10), 456(10), 7890(10).
Consider a decimal number 542.76(10) which can be represented in equivalent
value as:
5x102 + 4x101 + 2x100 + 7x10-1 + 6x10-2
Prof. K. Adisesha (Ph. D)
8
9. Positional Number System
Binary Number System:
Digital computer represents all kinds of data and information in the binary
system.
Binary number system consists of two digits 0 (low voltage) and 1 (high
voltage).
Its base or radix is 2.
Each digit or bit in binary number system can be 0 or 1.
The positional values are expressed in power of 2.
Prof. K. Adisesha (Ph. D)
9
10. Positional Number System
Binary Number System:
Digital computer represents all kinds of data and information in the binary
system.
Prof. K. Adisesha (Ph. D)
10
11. Positional Number System
Binary Number System:
Each digit or bit in binary number system can be 0 or 1 and the positional
values are expressed in power of 2.
The left most bit 1 is the highest order bit. It is called as Most Significant Bit
(MSB).
The right most bit 0 is the lower bit. It is called as Least Significant Bit (LSB).
Example: 1011(2), 111(2), 100001(2)
Consider a binary number 11011.10(2) which can be represented in equivalent
value as:
1x24 + 1x23 +0x22 + 1x21 + 1x20 + 1x2-1 + 0x2-2
Prof. K. Adisesha (Ph. D)
11
12. Positional Number System
Octal Number System:
The octal number system has digits starting from 0 to 7. The base or radix of
this system is 8.
The positional values are expressed in power of 8.
Any digit in this system is always less than 8.
Example: 123(8), 236(8), 564(8)
The number 6418 is not a valid octal number because 8 is not a valid digit.
Consider a Octal number 234.56(8) which can be represented in equivalent value
as:
2x82 + 3x81 + 4x80 + 5x8-1 + 6x8-2
Prof. K. Adisesha (Ph. D)
12
13. Positional Number System
Hexadecimal Number System:
The hexadecimal number system consists of 16 digits from 0 to 9 and A to F.
The letters A to F represent decimal numbers from 10 to 15.
That is, ‘A’ represents 10, ‘B’ represents 11, ‘C’ represents 12, ‘D’ represents 13, ‘E’
represents 14 and ‘F’ represents 15.
The base or radix of this number system is 16.
Example: 1A3(16), BCA(16), 56C(H)
Consider a Octal number 2AF.D6(16) which can be represented in equivalent
value as:
2x162 + Ax161 + Fx160 + Dx16-1 + 6x16-2
Prof. K. Adisesha (Ph. D)
13
15. DATA CONVERSIONS
Number System Conversions:
The various types of number system are classified as:
Conversion from Decimal to Binary
Conversion from Decimal to Octal
Conversion from Decimal to Hexadecimal
Conversion from Binary to Octal
Conversion from Binary to Hexadecimal
Conversion from Octal to Hexadecimal
Prof. K. Adisesha (Ph. D)
15
16. DATA CONVERSIONS
Conversion from Decimal to Binary:
Steps to convert decimal number to binary number:
• Step 1: Divide the given decimal number by 2.
• Step 2: Take the remainder and record it on the right side.
• Step 3: Repeat the Step 1 and Step 2 until the decimal number cannot be
divided further.
• Step 4: The first remainder will be the LSB and the last remainder is the
MSB.
The equivalent binary number is then written from left to right i.e. from MSB to
LSB.
Prof. K. Adisesha (Ph. D)
16
17. DATA CONVERSIONS
Conversion from Decimal to Binary:
The equivalent binary number is then written from left to right i.e. from MSB to LSB.
Thus 458(10)= 11001010(2)Prof. K. Adisesha (Ph. D)
17
18. DATA CONVERSIONS
Conversion from Decimal to Binary:
Steps to convert decimal fraction number to binary number:
• Step 1: Multiply the given decimal fraction number by 2.
• Step 2: Note the carry and the product.
• Step 3: Repeat the Step 1 and Step 2 until the decimal number cannot be
divided further.
• Step 4: The first carry will be the MSB and the last carry is the LSB.
The equivalent binary fraction number is written from MSB to LSB.
Prof. K. Adisesha (Ph. D)
18
19. DATA CONVERSIONS
Conversion from Decimal to Binary:
The equivalent binary number is then written from left to right i.e. from MSB to LSB.
Thus 458(10)= 11001010.1011(2)Prof. K. Adisesha (Ph. D)
19
20. DATA CONVERSIONS
Conversion from Binary to Decimal :
Steps to convert binary number to decimal number:
• Step 1: Start at the rightmost bit.
• Step 2: Take that bit and multiply by 2n, when n is the current position
beginning at 0 and increasing by 1 each time. This represents a power of
two.
• Step 3: Then, add all the products.
• Step 4: After addition, the resultant is equal to the decimal value of the
binary number
Prof. K. Adisesha (Ph. D)
20
22. DATA CONVERSIONS
Conversion from Decimal to Octal:
Steps to convert decimal number to octal number:
• Step 1: Divide the given decimal number by 8.
• Step 2: Take the remainder and record it on the right side.
• Step 3: Repeat the Step 1 and Step 2 until the decimal number cannot be
divided further.
• Step 4: The first remainder will be the LS-Digit and the last remainder is
the MS-Digit.
The equivalent binary number is then written from left to right i.e. from MS-
Digit to LS-Digit.
Prof. K. Adisesha (Ph. D)
22
24. DATA CONVERSIONS
Conversion from octal to decimal number:
Steps to convert octal number to decimal number:
• Step 1: Start at the rightmost bit.
• Step 2: Take that bit and multiply by 8n, when n is the current position
beginning at 0 and increasing by 1 each time. This represents the power of 8.
• Step 3: Then, add all the products.
• Step 4: After addition, the resultant is equal to the decimal value of the octal
number.
Prof. K. Adisesha (Ph. D)
24
26. DATA CONVERSIONS
Conversion from Decimal to Hexadecimal:
Steps to convert decimal number to hexadecimal number:
• Step 1: Divide the given decimal number by 16.
• Step 2: Take the remainder and record it on the right side.
• Step 3: Repeat the Step 1 and Step 2 until the decimal number cannot be
divided further.
• Step 4: The first remainder will be the LS-Digit and the last remainder is
the MS-Digit.
The equivalent binary number is then written from left to right i.e. from MS-
Digit to LS-Digit.
Prof. K. Adisesha (Ph. D)
26
27. DATA CONVERSIONS
Conversion from Decimal to Hexadecimal:
Example: to convert decimal number 38010 to hexadecimal number:
The equivalent binary number is then written from left to right i.e. from MS-
Digit to LS-Digit.
Prof. K. Adisesha (Ph. D)
27
28. DATA CONVERSIONS
Conversion from hexadecimal to decimal number:
Steps to convert hexadecimal number to decimal number:
• Step 1: Start at the rightmost bit.
• Step 2: Take that bit and multiply by 16n, when n is the current position
beginning at 0 and increasing by 1 each time. This represents the power of
16.
• Step 3: Then, add all the products.
• Step 4: After addition, the resultant is equal to the decimal value of the
hexadecimal number.
Prof. K. Adisesha (Ph. D)
28
30. DATA CONVERSIONS
Conversion from Binary to Octal:
Steps to convert Binary to octal:
• Step 1: Take a binary number in groups of 3 and use the appropriate octal digit in
its place.
• Step 2: Begin at the rightmost 3 bits. If we are not able to form a group of three,
insert 0s to the left until we get all groups of 3 bits each.
• Step 3: Write the octal equivalent of each group.
• Step 4: Repeat the steps until all groups have been converted.
It may be necessary to add a 0’s to the left of MSB and when representing fractions, it
may be necessary to add a 0’s to right of LSB.
Prof. K. Adisesha (Ph. D)
30
32. DATA CONVERSIONS
Conversion from Octal to Binary:
Steps to convert octal to binary:
• Step 1: Take the each digit from octal number.
• Step 2: Convert each digit to 3-bit binary number. (Each octal digit is represented
by a three- bit binary number as shown in Numbering System Table).
• Step 3: Write the Binary equivalent of each group.
Prof. K. Adisesha (Ph. D)
32
33. DATA CONVERSIONS
Conversion from Binary to Hexadecimal:
Steps to convert Binary to Hexadecimal:
• Step 1: Take a binary number in groups of 4 and use the appropriate hexadecimal
digit in its place.
• Step 2: Begin at the rightmost 4 bits. If we are not able to form a group of four,
insert 0s to the left until we get all groups of 4 bits each.
• Step 3: Write the hexadecimal equivalent of each group.
• Step 4: Repeat the steps until all groups have been converted.
It may be necessary to add a 0’s to the left of MSB and when representing fractions, it
may be necessary to add a 0’s to right of LSB.
Prof. K. Adisesha (Ph. D)
33
34. DATA CONVERSIONS
Conversion from Hexadecimal to Binary:
Steps to convert hexadecimal to binary:
• Step 1: Take the each digit from hexadecimal number.
• Step 2: Convert each digit to 4-bit binary number. (Each hexadecimal digit is
represented by a four- bit binary number as shown in Numbering System Table).
• Step 3: Write the Binary equivalent of each group.
Prof. K. Adisesha (Ph. D)
34
35. DATA CONVERSIONS
Conversion from Octal to Hexadecimal:
Steps to convert Octal to Hexadecimal:
• Step 1: write the binary equivalent of each octal digit.
• Step 2: Regroup them into 4 bits from the right side with zeros added, if necessary.
• Step 3: Convert each group into its equivalent hexadecimal digit.
Using Binary system, we can easily convert octal numbers to hexadecimal numbers and
vice-versa.
Prof. K. Adisesha (Ph. D)
35
36. Binary Arithmetic
Binary Addition:
The addition of two binary numbers is performed in same manner as the
addition of decimal number.
It adds only two bits and gives sum and carry. If a carry is generated, it should be
carried over to the addition of next two bits.
The basic rules of binary addition are:
Prof. K. Adisesha (Ph. D)
36
Addend1 Addend2 Sum Carry
0 0 0 0
O 1 1 0
1 0 1 0
1 1 0 1
37. Binary Arithmetic
Binary Subtraction:
This operation is same as the one performed in the decimal number system.
This operation is consists of two steps:
Determine whether it is necessary for us to borrow. If the subtrahend (the lower digit) is
larger than the minuend (the upper digit), it is necessary to borrow from the column to the
left. In binary two is borrowed.
Subtract the lower value from the upper value
The basic rules of binary subtraction are:
When we subtract 1 from 0, it is necessary
to borrow 1 from the next left column
i.e. from the next higher order position.
Prof. K. Adisesha (Ph. D)
37
Minuend Subtrahend Difference Barrow
0 0 0 0
0 1 1 1
1 0 1 0
1 1 0 0
38. Binary Arithmetic
Binary Addition & Subtraction:
This operation is same as the one performed in the decimal number system.
Prof. K. Adisesha (Ph. D)
38
40. Binary Arithmetic
Representation of signed Integers:
The digital computer handle both positive and negative integer.
It means, is required for representing the sign of the number (- or +), but cannot use the
sign (-) to denote the negative number or sign (+) to denote the positive number.
So, this is done by adding the leftmost bit to the number called sign bit.
A positive number has a sign bit 0, while the negative has a sign bit 1.
Prof. K. Adisesha (Ph. D)
40
41. Binary Arithmetic
Representation of signed Integers:
It is also called as fixed point representation.
A negative signed integer can be represented in one of the following:
Sign and magnitude method
One’s complement method
Two’s complement method
Prof. K. Adisesha (Ph. D)
41
42. Binary Arithmetic
Sign and magnitude method:
An integer containing a sign bit followed by magnitude bits are called sign-
magnitude integer.
In this method, first bit (MSB) is considered as a sign bit and the remaining bits stand
for magnitude.
Here positive number starts with 0 and negative number starts with 1.
Example: The binary number is 11001(2). If we take the size of the word is 1 byte ( 8
bits), then the number 25 will be represented as
Prof. K. Adisesha (Ph. D)
42
43. Binary Arithmetic
1’s Complement representation:
The 1’s complement of a binary number is obtained by changing each 0 to 1
and each 1 to 0.
This is the simplest method of representing negative binary number.
In this method, change each bit in the number to its complement.
Example: Find the 1’s complement of 101000.
Original binary number : 1 0 1 0 0 0
Find 1’s Complement : 0 1 0 1 1 1
Thus 1’s complement of: 101000 is 010111.
Prof. K. Adisesha (Ph. D)
43
44. Binary Arithmetic
2’s Complement representation:
The 2’s complement of a binary number is obtained by taking 1’s complement of
the number and adding 1 to the Least Significant Bit (LSB) position.
The general procedure to find 2’s complement is given by:
2’s Complement = 1’s Complement + 1
Example 1: Find the 2’s complement of: 101000.
Original binary number : 1 0 1 0 0 0
Find 1’s Complement : 0 1 0 1 1 1
Add 1 to LSB + 1
Hence 2’s Complement of 101000 is: 0 1 1 0 0 0
Prof. K. Adisesha (Ph. D)
44
45. Binary Arithmetic
Subtraction of Binary Number using Complement:
Most of the computers perform subtraction using complemented number.
This is less expensive because the same addition circuit is used for subtraction with
slight changes in the circuit.
In the binary number system we can perform subtraction operation using two methods
of complements:
Subtraction using 1’s Complement
Subtraction using 2’s Complement
Prof. K. Adisesha (Ph. D)
45
46. Binary Arithmetic
Subtraction using 1’s Complement:
Subtraction using 1’s Complement is performed using two cases.
Case 1: Subtracting a larger number from a smaller number (Minuend is less than
Subtrahend)
o Step 1: Find the 1’s complement of the subtrahend.
o Step 2: Add this to the minuend.
o Step 3: There will be no carry, Re complement the answer to get the difference
Prof. K. Adisesha (Ph. D)
46
47. Binary Arithmetic
Subtraction using 1’s Complement:
Example : Subtract 52 from 25 using 1’s complement.
Decimal Binary
Decimal Binary Minuend 25 : 011001
Subtrahend -52 : 110100
1’s complement of subtrahend is : 001011
Minuend : 0 1 1 0 0 1
1’s Complement of subtrahend : + 0 0 1 0 1 1
: 1 0 0 1 0 0
Since there is no carry take 1’s complement : 0 1 1 0 1 1 attach a negative sign Hence,
the result = - 011011 i.e. - 27
Prof. K. Adisesha (Ph. D)
47
48. Binary Arithmetic
Subtraction using 1’s Complement:
Subtraction using 1’s Complement is performed using two cases.
Case 2: Subtracting a smaller number from a larger number (Minuend is greater than
Subtrahend)
o Step 1: Find the 1’s complement of the subtrahend.
o Step 2: Add this to the minuend.
o Step 3: Carry is generated, this carry is called as the end around carry
o Step 4: Add the end around carry back to the LSB to get the final difference
Prof. K. Adisesha (Ph. D)
48
49. Binary Arithmetic
Subtraction using 1’s Complement:
Example : Subtract 15 from 25 using 1’s complement.
Decimal Binary
Minuend 25 : 11001
Subtrahend -15 : 01111
1’s complement of subtrahend is : 10000
Minuend : 1 1 0 0 1
1’s Complement of subtrahend : + 1 0 0 0 0
Since there is carry add carry to LSB : 1 0 1 0 0 1
+1
MSB is zero : 0 1 0 1 0 attach a Positive sign Hence, the result = + 01010 i.e. +10
Prof. K. Adisesha (Ph. D)
49
50. Computer Codes
Computer Codes:
Computer code helps us to represent characters in a coded form in the memory of
the computer.
These codes represent specific formats which are used to record data.
Some of the commonly used computer codes are:
Binary Coded Decimal (BCD)
Extended Binary Coded Decimal Interchange Code (EBCDIC)
American Standard Code for Information Interchange (ASCII)
Excess-3 Code.
Prof. K. Adisesha (Ph. D)
50
51. Computer Codes
BCD code (or Weighted BCD Code or 8421 Code):
BCD stands for Binary Coded Decimal.
It is one of the early computer codes.
In this coding system, the bits are given from left to right, the weights 8,4,2,1
respectively
In 4-bit BCD only 24=16 configurations are possible which is insufficient to represent
the various characters.
Hence 6-bit BCD code was developed by adding two zone positions with which it is
possible to represent 26=64 characters
Prof. K. Adisesha (Ph. D)
51
52. Computer Codes
BCD code (or Weighted BCD Code or 8421 Code):
The BCD equivalent of each decimal digit is shown in table.
Prof. K. Adisesha (Ph. D)
52
Decimal BCD Code Decimal BCD Code
0 0000 5 0101
1 0001 6 0110
2 0010 7 0111
3 0011 8 1000
4 0100 9 1001
53. Computer Codes
Excess-3 BCD code (or XS-3 Code):
BCD stands for Binary Coded Decimal.
The Excess-3 BCD code is a non-weighted code used to express decimal number.
The name Excess-3 code derived from the fact that each binary code is the
corresponding BCD code plus 0011(2)(i.e. Decimal 3).
This code is used in some old computers.
The Excess-3 code equivalent of decimal (0-9)
Prof. K. Adisesha (Ph. D)
53
54. Computer Codes
Excess-3 code (or Non-Weighted Code):
The following table gives the Excess-3 code equivalent of decimal (0-9)..
Prof. K. Adisesha (Ph. D)
54
Decimal XS-3 Code Decimal XS-3 Code
0 0011 5 1000
1 0100 6 1001
2 0101 7 1010
3 0110 8 1011
4 0111 9 1100
55. Computer Codes
ASCII Code:
It stands for the American Standard Code for Information Interchange.
It is a 7-bit code, which is possible to represent 27=128 characters.
It is used in most microcomputers and minicomputers and in mainframes.
The ASCII code (Pronounced ask-ee) is of two types – ASCII-7 and ASCII-8.
ASCII-7 is 7-bit code for representing English characters as numbers, with each letter
assigned a number from 0 to 127.
Prof. K. Adisesha (Ph. D)
55
56. Computer Codes
EBCDIC:
It stand for Extended Binary Coded Decimal Interchange Code.
This was developed by IBM.
It uses an 8-bit code and hence possible to represent 256 different characters or bit
combinations. EBCDIC is used on most computers and computer equipment today.
It is a coding method generally used by larger computers (mainframes) to present
letters, numbers or other symbols in a binary language the computer can understand.
EBCDIC is an 8-bit code; therefore, it is divided into two 4-bit groups, where each
4-bit can be represented as 1 hexadecimal digit.
Prof. K. Adisesha (Ph. D)
56
57. Computer Codes
UNICODE:
Unicode is a universal character encoding standard that assigns a code to every
character and symbol in every language in the world.
Unicode is the only encoding standard that ensures that you can retrieve or combine
data using any combination of languages.
Unicode may be 8-bit, 16-bit, or 32-bit.
The two common Unicode implementations for computer systems are:
UTF-8, a variable length encoding scheme in which each written symbol is represented by a one- to
four-byte code
UTF-16, a fixed width encoding scheme in which each written symbol is represented by a two-byte
code
Prof. K. Adisesha (Ph. D)
57