This document discusses various methods of data representation in computers, including:
1. Numeric and non-numeric data types. Computers represent numeric data like integers and real numbers, as well as non-numeric data like letters and symbols.
2. Positional number systems like binary, decimal, octal and hexadecimal are used for efficient internal representation in computers. Conversion between different bases is also covered.
3. Fixed point number representation including signed magnitude, 1's complement, and 2's complement representations. Floating point number representation separates the mantissa and exponent is also discussed.
This document discusses various methods of data representation in computers, including:
1. Numeric data such as integers and real numbers can be represented in binary, octal, hexadecimal, or decimal number systems. Positional number systems like binary are preferred in computers due to their efficient hardware implementation.
2. Fixed point numbers represent numeric values using a binary number and radix point at a fixed location. Signed magnitude, 1's complement, and 2's complement representations allow representing positive and negative numbers.
3. Floating point numbers represent values using a signed mantissa and exponent, allowing a wider range of numbers but with less precision than fixed point. The radix and radix point position are implied rather than fixed.
The document discusses different methods of representing numeric and non-numeric data in digital computers. It covers numeric data types like integer and real numbers. It explains why positional number systems like binary are used over non-positional systems for efficiency. Different number bases like binary, octal, hexadecimal and their representations are described. Methods to convert between bases like binary to decimal are provided, along with examples. Fixed point and floating point numeric representations are introduced. Signed number representations using signed magnitude, 1's complement and 2's complement are also summarized.
BOOTH ALGO, DIVISION(RESTORING _ NON RESTORING) etc etcAbhishek Rajpoot
The document discusses various aspects of central processing unit (CPU) architecture and arithmetic operations. It covers the main components of a CPU - the arithmetic logic unit (ALU), control unit, and registers. It then describes different data representation methods including fixed-point and floating-point numbers. Various arithmetic operations for both types of numbers such as addition, subtraction, multiplication, and division are explained. Different adder designs like ripple-carry adder and carry lookahead adder are also summarized.
This document discusses Pandas DataFrames. DataFrames can be created from various data sources and support operations on rows and columns like selecting, adding, deleting, and renaming. Indexing using labels or positions allows accessing specific data elements. Functions like head, tail, max, min provide convenient summaries of DataFrames.
This document provides an outline for a course on digital logic design. It includes the course title and credit hours, topics that will be covered such as Boolean algebra, logic gates, combinational and sequential circuits, programmable logic devices, and memory. It also lists recommended textbooks and provides the grading breakdown. Examples of analogue and digital quantities, signals, and number systems are given. Common logic gates such as AND, OR, NOT, NAND and NOR are described along with their truth tables and applications. Combinational circuits, functional devices, sequential circuits and memory are also introduced.
This document provides an introduction to Python programming concepts including data types, operators, control flow statements, functions and modules. It discusses the basic Python data types like integers, floats, booleans, strings, lists, tuples, dictionaries and sets. It also covers Python operators like arithmetic, assignment, comparison, logical and identity operators. Additionally, it describes control flow statements like if/else and for loops. Finally, it touches on functions, modules and input/output statements in Python.
The document provides an overview of pandas series including:
- Creation of series from arrays, dictionaries, scalar values
- Mathematical operations on series like addition, subtraction
- Functions to access series data like head(), tail(), indexing, slicing
- Examples of arithmetic operations on series using operators and methods
The document discusses number systems and binary codes. It describes how numbers are represented in computers using binary digits and how different number systems like decimal, binary, octal and hexadecimal work. It explains how to convert between decimal and other bases as well as how to perform arithmetic operations like addition, subtraction and multiplication in binary. Various coding schemes for encoding numbers and characters are also summarized.
This document discusses various methods of data representation in computers, including:
1. Numeric data such as integers and real numbers can be represented in binary, octal, hexadecimal, or decimal number systems. Positional number systems like binary are preferred in computers due to their efficient hardware implementation.
2. Fixed point numbers represent numeric values using a binary number and radix point at a fixed location. Signed magnitude, 1's complement, and 2's complement representations allow representing positive and negative numbers.
3. Floating point numbers represent values using a signed mantissa and exponent, allowing a wider range of numbers but with less precision than fixed point. The radix and radix point position are implied rather than fixed.
The document discusses different methods of representing numeric and non-numeric data in digital computers. It covers numeric data types like integer and real numbers. It explains why positional number systems like binary are used over non-positional systems for efficiency. Different number bases like binary, octal, hexadecimal and their representations are described. Methods to convert between bases like binary to decimal are provided, along with examples. Fixed point and floating point numeric representations are introduced. Signed number representations using signed magnitude, 1's complement and 2's complement are also summarized.
BOOTH ALGO, DIVISION(RESTORING _ NON RESTORING) etc etcAbhishek Rajpoot
The document discusses various aspects of central processing unit (CPU) architecture and arithmetic operations. It covers the main components of a CPU - the arithmetic logic unit (ALU), control unit, and registers. It then describes different data representation methods including fixed-point and floating-point numbers. Various arithmetic operations for both types of numbers such as addition, subtraction, multiplication, and division are explained. Different adder designs like ripple-carry adder and carry lookahead adder are also summarized.
This document discusses Pandas DataFrames. DataFrames can be created from various data sources and support operations on rows and columns like selecting, adding, deleting, and renaming. Indexing using labels or positions allows accessing specific data elements. Functions like head, tail, max, min provide convenient summaries of DataFrames.
This document provides an outline for a course on digital logic design. It includes the course title and credit hours, topics that will be covered such as Boolean algebra, logic gates, combinational and sequential circuits, programmable logic devices, and memory. It also lists recommended textbooks and provides the grading breakdown. Examples of analogue and digital quantities, signals, and number systems are given. Common logic gates such as AND, OR, NOT, NAND and NOR are described along with their truth tables and applications. Combinational circuits, functional devices, sequential circuits and memory are also introduced.
This document provides an introduction to Python programming concepts including data types, operators, control flow statements, functions and modules. It discusses the basic Python data types like integers, floats, booleans, strings, lists, tuples, dictionaries and sets. It also covers Python operators like arithmetic, assignment, comparison, logical and identity operators. Additionally, it describes control flow statements like if/else and for loops. Finally, it touches on functions, modules and input/output statements in Python.
The document provides an overview of pandas series including:
- Creation of series from arrays, dictionaries, scalar values
- Mathematical operations on series like addition, subtraction
- Functions to access series data like head(), tail(), indexing, slicing
- Examples of arithmetic operations on series using operators and methods
The document discusses number systems and binary codes. It describes how numbers are represented in computers using binary digits and how different number systems like decimal, binary, octal and hexadecimal work. It explains how to convert between decimal and other bases as well as how to perform arithmetic operations like addition, subtraction and multiplication in binary. Various coding schemes for encoding numbers and characters are also summarized.
For more course tutorials visit
www.newtonhelp.com
Week 1 HomeworkCommand Line in Windows and Linux
Using Google, research what kernel operating systems have been used in the video gaming industry. Describe the architecture and details regarding its advantages or disadvantages (i.e, consider Windows, Linux, based, etc.). A minimum of two paragraphs of research information is required, along with your own interpretation of the content.
This document discusses lists in Python. It covers:
- Creating and initializing lists
- Accessing list elements using indexes and slicing
- Common list methods like append(), insert(), remove(), pop(), sort(), reverse()
- Built-in functions like len(), max(), min(), sum()
- Traversing lists using for loops
- Examples of list operations like concatenation and membership testing
- A menu driven program demonstrating various list operations
This chapter discusses digital systems and number conversion. Digital systems use discrete values rather than continuous values as in analog systems. They can provide exact outputs. The chapter covers converting between number bases, such as decimal to binary, using division or multiplication. It also addresses representing negative numbers and binary codes. The design of digital systems includes system, logic, and circuit design. Combinational and sequential circuits are introduced.
1. The document discusses various types of plots that can be created using matplotlib in Python, including line plots, bar graphs, histograms, pie charts, frequency polygons, box plots, and scatter plots.
2. It describes how to customize plots by changing colors, styles, widths, and adding labels, titles, and legends.
3. Examples are provided for creating different plot types like line charts, bar graphs, histograms, and customizing aspects of the plots.
The document discusses integer multiplication and division techniques in binary. It describes how unsigned and signed multiplication can be performed sequentially by shifting and adding the multiplicand. For division, the dividend is shifted left while subtracting the divisor, with the quotient and remainder stored in registers. Faster multiplication uses multiple adders in parallel, and division similarly shifts and subtracts to iteratively derive the quotient digits. MIPS instructions like mult and div operate on registers to perform 32-bit integer operations.
Introduction
Plotting basic 2-D plots.
The plot command
The fplot command
Plotting multiple graphs in the same plot
Formatting plots
USING THE plot() COMMAND TO PLOT
MULTIPLE GRAPHS IN THE SAME PLOT
MATLAB PROGRAM TO PLOT VI CHARACTERISTICS OF A DIODE
SUMMARY
This document provides an overview of digital systems and number representation in digital logic design. It discusses:
- Digital systems take discrete inputs and have discrete internal states to generate discrete outputs.
- Digital systems can be combinational (output depends only on input) or sequential (output depends on input and state). Sequential systems can be synchronous (state updates at clock) or asynchronous.
- Number systems like binary, octal, hexadecimal represent numbers using different radixes or bases. Binary uses two digits (0-1) while octal uses eight and hexadecimal uses sixteen.
- Operations like addition and subtraction can be performed in any number base through appropriate algorithms. Numbers can be converted between bases through division and
Introduction
Number Systems
Types of Number systems
Inter conversion of number systems
Binary addition ,subtraction, multiplication and
division
Complements of binary number(1’s and 2’s
complement)
Grey code, ASCII, Ex
3,BCD
This document provides an introduction to basic MATLAB commands and operations. It discusses how to enter and exit MATLAB, lists some common commands like clearing the screen and workspace. It also covers defining different variable types like scalars, vectors, matrices, and character arrays. It provides examples of arithmetic operations on arrays and defines matrices. Exercises are included to practice these concepts.
Chapter 01 Basic Principles of Digital SystemsSSE_AndyLi
This document provides an overview of digital systems fundamentals, including:
- Analog signals have continuous values while digital signals can only have discrete values (0 or 1).
- Digital electronics uses binary logic levels to represent information, with a high voltage representing 1 and a low voltage representing 0.
- The binary number system uses positional notation to represent numbers using only the digits 0 and 1.
- Digital circuits operate on binary inputs and outputs, with truth tables listing all possible input-output combinations for a logic gate or circuit.
This document provides an overview of computer systems and programming. It defines a computer as a device that takes in raw data, processes it under a set of instructions called a program, and provides an output. Computers provide benefits like speed, accuracy, and ability to handle large workloads. The document then discusses computer hardware components, software components like operating systems and applications, and data representation in computers using bits, integers, and number systems. It also covers basic concepts in C++ programming like what a computer program is, compilers vs interpreters, and binary operations like addition and subtraction.
FYBSC IT Digital Electronics Unit I Chapter I Number System and Binary Arithm...Arti Parab Academics
Number System:
Analog System, digital system, numbering system, binary number
system, octal number system, hexadecimal number system, conversion
from one number system to another, floating point numbers, weighted
codes binary coded decimal, non-weighted codes Excess – 3 code, Gray
code, Alphanumeric codes – ASCII Code, EBCDIC, ISCII Code,
Hollerith Code, Morse Code, Teletypewriter (TTY), Error detection
and correction, Universal Product Code, Code conversion.
This document discusses digital logic design and binary numbers. It covers topics such as digital vs analog signals, binary number systems, addition and subtraction in binary, and number base conversions between decimal, binary, octal, and hexadecimal. It also discusses complements, specifically 1's complement and radix complement. The purpose is to provide background information on fundamental concepts for digital logic design.
The document contains a list of 16 programs related to arrays in Swift. The programs cover topics like printing arrays, searching arrays, sorting arrays, inserting/deleting elements from arrays, and performing operations on elements in arrays. Functions are defined to implement each program with arrays and size passed as parameters.
Lec2 Intro to Computer Engineering by Hsien-Hsin Sean Lee Georgia Tech -- Num...Hsien-Hsin Sean Lee, Ph.D.
This document discusses number systems and binary arithmetic. It begins by explaining decimal and binary number representation, including place value and how to derive numbers in different bases. It then covers counting in binary, octal, and base-22 systems. Next, it discusses representing negative numbers using sign-magnitude, one's complement, and two's complement methods. Finally, it demonstrates binary addition and computation for both unsigned and signed numbers using two's complement.
THIS PPT IS PRESENTED TO PROF. RAVITESH MISHRA FROM EC FINAL YEAR STUDENTS MADE FROM RAZAVI,DESIGN OF ANALOG CMOS INTEGRATED CIRCUITS ON DATAPATH SUBSYSTEM-MULTIPLICATION
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 discusses various methods of data representation in digital computers. It begins by explaining that data is stored in binary form in computer memory and registers. It then describes different data types like numbers, letters, and codes.
The document goes on to explain different number systems like decimal, binary, octal, and hexadecimal. It provides examples of converting between these number systems. It also discusses fixed point and floating point representation of numeric data. Fixed point representation keeps the binary point in a fixed position, while floating point uses two registers, one for the mantissa and one for the exponent.
The document concludes by covering other binary codes like Gray code for analog to digital conversion and various decimal codes. It also discusses error detection
The document outlines key concepts in digital logic design and binary numbers, including:
- Digital systems represent information using discrete binary values of 0 and 1, unlike analog systems which use continuous values.
- Binary, octal, decimal, and hexadecimal number systems are examined, including how to convert between them.
- Binary addition, subtraction, multiplication and complements are explained through examples.
- 1's complement, 2's complement and radix complement operations are defined for binary numbers, allowing subtraction to be performed by addition of complements.
This document provides an introduction to a digital design course. It discusses the recommended textbook, course description, grading breakdown, and course outline. The course focuses on fundamental digital concepts like number systems, Boolean algebra, logic gates, combinational and sequential logic. It will cover topics such as binary numbers, Boolean functions, logic gate minimization, adders/subtractors, multiplexers, flip-flops, and finite state machines. Students are expected to attend every lecture and participate in classroom discussions. Grades will be based on projects, midterm exams, and quizzes/assignments.
For more course tutorials visit
www.newtonhelp.com
Week 1 HomeworkCommand Line in Windows and Linux
Using Google, research what kernel operating systems have been used in the video gaming industry. Describe the architecture and details regarding its advantages or disadvantages (i.e, consider Windows, Linux, based, etc.). A minimum of two paragraphs of research information is required, along with your own interpretation of the content.
This document discusses lists in Python. It covers:
- Creating and initializing lists
- Accessing list elements using indexes and slicing
- Common list methods like append(), insert(), remove(), pop(), sort(), reverse()
- Built-in functions like len(), max(), min(), sum()
- Traversing lists using for loops
- Examples of list operations like concatenation and membership testing
- A menu driven program demonstrating various list operations
This chapter discusses digital systems and number conversion. Digital systems use discrete values rather than continuous values as in analog systems. They can provide exact outputs. The chapter covers converting between number bases, such as decimal to binary, using division or multiplication. It also addresses representing negative numbers and binary codes. The design of digital systems includes system, logic, and circuit design. Combinational and sequential circuits are introduced.
1. The document discusses various types of plots that can be created using matplotlib in Python, including line plots, bar graphs, histograms, pie charts, frequency polygons, box plots, and scatter plots.
2. It describes how to customize plots by changing colors, styles, widths, and adding labels, titles, and legends.
3. Examples are provided for creating different plot types like line charts, bar graphs, histograms, and customizing aspects of the plots.
The document discusses integer multiplication and division techniques in binary. It describes how unsigned and signed multiplication can be performed sequentially by shifting and adding the multiplicand. For division, the dividend is shifted left while subtracting the divisor, with the quotient and remainder stored in registers. Faster multiplication uses multiple adders in parallel, and division similarly shifts and subtracts to iteratively derive the quotient digits. MIPS instructions like mult and div operate on registers to perform 32-bit integer operations.
Introduction
Plotting basic 2-D plots.
The plot command
The fplot command
Plotting multiple graphs in the same plot
Formatting plots
USING THE plot() COMMAND TO PLOT
MULTIPLE GRAPHS IN THE SAME PLOT
MATLAB PROGRAM TO PLOT VI CHARACTERISTICS OF A DIODE
SUMMARY
This document provides an overview of digital systems and number representation in digital logic design. It discusses:
- Digital systems take discrete inputs and have discrete internal states to generate discrete outputs.
- Digital systems can be combinational (output depends only on input) or sequential (output depends on input and state). Sequential systems can be synchronous (state updates at clock) or asynchronous.
- Number systems like binary, octal, hexadecimal represent numbers using different radixes or bases. Binary uses two digits (0-1) while octal uses eight and hexadecimal uses sixteen.
- Operations like addition and subtraction can be performed in any number base through appropriate algorithms. Numbers can be converted between bases through division and
Introduction
Number Systems
Types of Number systems
Inter conversion of number systems
Binary addition ,subtraction, multiplication and
division
Complements of binary number(1’s and 2’s
complement)
Grey code, ASCII, Ex
3,BCD
This document provides an introduction to basic MATLAB commands and operations. It discusses how to enter and exit MATLAB, lists some common commands like clearing the screen and workspace. It also covers defining different variable types like scalars, vectors, matrices, and character arrays. It provides examples of arithmetic operations on arrays and defines matrices. Exercises are included to practice these concepts.
Chapter 01 Basic Principles of Digital SystemsSSE_AndyLi
This document provides an overview of digital systems fundamentals, including:
- Analog signals have continuous values while digital signals can only have discrete values (0 or 1).
- Digital electronics uses binary logic levels to represent information, with a high voltage representing 1 and a low voltage representing 0.
- The binary number system uses positional notation to represent numbers using only the digits 0 and 1.
- Digital circuits operate on binary inputs and outputs, with truth tables listing all possible input-output combinations for a logic gate or circuit.
This document provides an overview of computer systems and programming. It defines a computer as a device that takes in raw data, processes it under a set of instructions called a program, and provides an output. Computers provide benefits like speed, accuracy, and ability to handle large workloads. The document then discusses computer hardware components, software components like operating systems and applications, and data representation in computers using bits, integers, and number systems. It also covers basic concepts in C++ programming like what a computer program is, compilers vs interpreters, and binary operations like addition and subtraction.
FYBSC IT Digital Electronics Unit I Chapter I Number System and Binary Arithm...Arti Parab Academics
Number System:
Analog System, digital system, numbering system, binary number
system, octal number system, hexadecimal number system, conversion
from one number system to another, floating point numbers, weighted
codes binary coded decimal, non-weighted codes Excess – 3 code, Gray
code, Alphanumeric codes – ASCII Code, EBCDIC, ISCII Code,
Hollerith Code, Morse Code, Teletypewriter (TTY), Error detection
and correction, Universal Product Code, Code conversion.
This document discusses digital logic design and binary numbers. It covers topics such as digital vs analog signals, binary number systems, addition and subtraction in binary, and number base conversions between decimal, binary, octal, and hexadecimal. It also discusses complements, specifically 1's complement and radix complement. The purpose is to provide background information on fundamental concepts for digital logic design.
The document contains a list of 16 programs related to arrays in Swift. The programs cover topics like printing arrays, searching arrays, sorting arrays, inserting/deleting elements from arrays, and performing operations on elements in arrays. Functions are defined to implement each program with arrays and size passed as parameters.
Lec2 Intro to Computer Engineering by Hsien-Hsin Sean Lee Georgia Tech -- Num...Hsien-Hsin Sean Lee, Ph.D.
This document discusses number systems and binary arithmetic. It begins by explaining decimal and binary number representation, including place value and how to derive numbers in different bases. It then covers counting in binary, octal, and base-22 systems. Next, it discusses representing negative numbers using sign-magnitude, one's complement, and two's complement methods. Finally, it demonstrates binary addition and computation for both unsigned and signed numbers using two's complement.
THIS PPT IS PRESENTED TO PROF. RAVITESH MISHRA FROM EC FINAL YEAR STUDENTS MADE FROM RAZAVI,DESIGN OF ANALOG CMOS INTEGRATED CIRCUITS ON DATAPATH SUBSYSTEM-MULTIPLICATION
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 discusses various methods of data representation in digital computers. It begins by explaining that data is stored in binary form in computer memory and registers. It then describes different data types like numbers, letters, and codes.
The document goes on to explain different number systems like decimal, binary, octal, and hexadecimal. It provides examples of converting between these number systems. It also discusses fixed point and floating point representation of numeric data. Fixed point representation keeps the binary point in a fixed position, while floating point uses two registers, one for the mantissa and one for the exponent.
The document concludes by covering other binary codes like Gray code for analog to digital conversion and various decimal codes. It also discusses error detection
The document outlines key concepts in digital logic design and binary numbers, including:
- Digital systems represent information using discrete binary values of 0 and 1, unlike analog systems which use continuous values.
- Binary, octal, decimal, and hexadecimal number systems are examined, including how to convert between them.
- Binary addition, subtraction, multiplication and complements are explained through examples.
- 1's complement, 2's complement and radix complement operations are defined for binary numbers, allowing subtraction to be performed by addition of complements.
This document provides an introduction to a digital design course. It discusses the recommended textbook, course description, grading breakdown, and course outline. The course focuses on fundamental digital concepts like number systems, Boolean algebra, logic gates, combinational and sequential logic. It will cover topics such as binary numbers, Boolean functions, logic gate minimization, adders/subtractors, multiplexers, flip-flops, and finite state machines. Students are expected to attend every lecture and participate in classroom discussions. Grades will be based on projects, midterm exams, and quizzes/assignments.
This document summarizes different number systems used in computing including binary, octal, decimal, and hexadecimal. It explains how to convert between these number systems using theorems about their bases. Key topics covered include binary arithmetic, signed and unsigned integer representation, and how floating point numbers and characters are stored in binary format. Conversion charts are provided for binary to octal and hexadecimal. Representations of integers, characters, and floating point numbers in binary are also summarized.
This document provides an overview of digital systems and binary numbers. It discusses topics such as analog vs digital signals, different number systems including binary, octal, decimal and hexadecimal, binary operations like addition and multiplication, and number base conversions. It also covers binary complements including 1's complement and 2's complement, which are important for signed binary numbers and binary subtraction.
This document discusses different methods of representing data in a computer, including numeric data types, number systems, and encoding schemes. It covers binary, decimal, octal, and hexadecimal number systems. Methods for representing signed and unsigned integers are described, such as signed-magnitude, 1's complement, and 2's complement representations. Floating point number representation with a sign bit, exponent field, and significand is also summarized. Conversion between different number bases and data encodings like binary-coded decimal are explained through examples.
The document provides information about different number systems used in computers, including binary, octal, hexadecimal, and decimal. It explains the characteristics of each system such as the base and digits used. Methods for converting between number systems like binary to decimal and vice versa are presented. Shortcut methods for direct conversions between binary, octal, and hexadecimal are also described. Binary arithmetic and binary-coded decimal number representation are discussed.
This document discusses different number systems including decimal, binary, octal, and hexadecimal. It explains how numbers are represented in each system using positional notation. Conversion between these number systems is demonstrated through examples. The document also covers signed integer representation methods like sign-and-magnitude, one's complement, and two's complement. Finally, it briefly introduces representation of characters using coding standards.
This document provides an overview of Boolean algebra and logic gates. It begins with reviewing binary number systems, binary arithmetic, and binary codes. It then covers Boolean algebra, truth tables, canonical and standard forms. It also discusses logic operations and logic gates like Karnaugh maps up to 6 variables including don't care conditions. Finally, it discusses sum of products and products of sum representations.
Unsigned and Signed fixed point Addition and subtractionciyamala kushbu
This content covers second unit COMPUTER ARCHITECTURE AND ORGANIZATION framed as per syllabus of Anna University 2017 Regulation.. This upload covers what is fixed and floating point operations. In fixed point operations the unsigned and signed addition and subtraction has been covered .
This document provides information about different numbering systems used in digital systems such as binary, decimal, octal and hexadecimal. It discusses how to convert between these numbering systems and perform arithmetic operations such as addition and subtraction in different bases. Various coding systems for representing positive and negative numbers like sign-magnitude, 1's complement and 2's complement are also covered. Other topics include binary coded decimal (BCD) system and ASCII code. The document aims to help understand data representation and arithmetic operations in digital computers and networks.
This document discusses different methods of numeric data representation in computers, including fixed point and floating point representation. It covers positional number systems like binary, octal, decimal and hexadecimal. It also describes how signed integers are represented using complement notation, including 1's complement and 2's complement. Fixed point representation stores both the integer and fractional parts of a number in a fixed number of bits.
The document discusses different methods for representing negative numbers in digital circuits, including complement representations and signed-magnitude. It covers how addition and subtraction are performed using 1's complement and 2's complement representations through examples. Complement representations allow subtraction to be performed by adding the complement of a number. The efficient implementation of addition and subtraction circuits in digital hardware is also discussed.
Digital systems represent information using discrete binary values of 0 and 1 rather than continuous analog values. Binary numbers use a base-2 numbering system with place values that are powers of 2. There are various number systems like decimal, binary, octal and hexadecimal that use different number bases and represent the same number in different ways. Complements are used in binary arithmetic to perform subtraction by adding the 1's or 2's complement of a number. The 1's complement is obtained by inverting all bits, while the 2's complement is obtained by inverting all bits and adding 1.
This document discusses computer arithmetic and data types used in digital computers. It begins by explaining different number systems like binary, decimal, octal and hexadecimal. It then describes various data types like integers, floating point numbers and alphanumeric characters represented using ASCII codes. The document also covers binary number representations like signed magnitude, one's complement and two's complement. It discusses addition and subtraction algorithms for signed numbers in these representations. Finally, it provides examples of conversions between different number systems and arithmetic operations.
The document introduces computer architecture and system software. It discusses the differences between computer organization and computer architecture. It describes the basic components of a computer based on the Von Neumann architecture, which consists of four main sub-systems: memory, ALU, control unit, and I/O. The document also discusses bottlenecks of the Von Neumann architecture and differences between microprocessors and microcontrollers. It covers computer arithmetic concepts like integer representation, floating point representation using IEEE 754 standard, and number bases conversion. Additional topics include binary operations like addition, subtraction using complements, and multiplication algorithms like Booth's multiplication.
Chapter 1 Digital Systems and Binary Numbers.pptAparnaDas827261
Digital Systems and Binary Numbers
- Digital systems manipulate discrete elements of information represented in binary form.
- The binary number system uses only two digits, 0 and 1, with place values that are powers of two.
- Conversions can be made between decimal, binary, octal, and hexadecimal number systems through arithmetic operations and grouping bits.
The document discusses digital and analog systems. It explains that digital systems represent information as discrete values using bits, whereas analog systems represent information as continuous values. It provides examples of digital and analog signals and discusses how a continuous analog signal can be converted to a discrete digital signal through sampling and quantization. It also covers binary, octal, and hexadecimal number systems and how to convert between them. Finally, it discusses binary addition and subtraction using complement representations.
Digital systems process and store information in digital form using discrete values, usually binary digits 0 and 1. A computer manipulates information in binary form using transistors in on or off states. Digital systems are found in a wide range of applications and have advantages over analog systems like lower cost, greater reliability, and flexibility. Digital computers represent numbers, instructions, and data using binary numbers and perform arithmetic and logical operations on them.
Electric vehicle and photovoltaic advanced roles in enhancing the financial p...IJECEIAES
Climate change's impact on the planet forced the United Nations and governments to promote green energies and electric transportation. The deployments of photovoltaic (PV) and electric vehicle (EV) systems gained stronger momentum due to their numerous advantages over fossil fuel types. The advantages go beyond sustainability to reach financial support and stability. The work in this paper introduces the hybrid system between PV and EV to support industrial and commercial plants. This paper covers the theoretical framework of the proposed hybrid system including the required equation to complete the cost analysis when PV and EV are present. In addition, the proposed design diagram which sets the priorities and requirements of the system is presented. The proposed approach allows setup to advance their power stability, especially during power outages. The presented information supports researchers and plant owners to complete the necessary analysis while promoting the deployment of clean energy. The result of a case study that represents a dairy milk farmer supports the theoretical works and highlights its advanced benefits to existing plants. The short return on investment of the proposed approach supports the paper's novelty approach for the sustainable electrical system. In addition, the proposed system allows for an isolated power setup without the need for a transmission line which enhances the safety of the electrical network
Generative AI Use cases applications solutions and implementation.pdfmahaffeycheryld
Generative AI solutions encompass a range of capabilities from content creation to complex problem-solving across industries. Implementing generative AI involves identifying specific business needs, developing tailored AI models using techniques like GANs and VAEs, and integrating these models into existing workflows. Data quality and continuous model refinement are crucial for effective implementation. Businesses must also consider ethical implications and ensure transparency in AI decision-making. Generative AI's implementation aims to enhance efficiency, creativity, and innovation by leveraging autonomous generation and sophisticated learning algorithms to meet diverse business challenges.
https://www.leewayhertz.com/generative-ai-use-cases-and-applications/
Introduction- e - waste – definition - sources of e-waste– hazardous substances in e-waste - effects of e-waste on environment and human health- need for e-waste management– e-waste handling rules - waste minimization techniques for managing e-waste – recycling of e-waste - disposal treatment methods of e- waste – mechanism of extraction of precious metal from leaching solution-global Scenario of E-waste – E-waste in India- case studies.
Prediction of Electrical Energy Efficiency Using Information on Consumer's Ac...PriyankaKilaniya
Energy efficiency has been important since the latter part of the last century. The main object of this survey is to determine the energy efficiency knowledge among consumers. Two separate districts in Bangladesh are selected to conduct the survey on households and showrooms about the energy and seller also. The survey uses the data to find some regression equations from which it is easy to predict energy efficiency knowledge. The data is analyzed and calculated based on five important criteria. The initial target was to find some factors that help predict a person's energy efficiency knowledge. From the survey, it is found that the energy efficiency awareness among the people of our country is very low. Relationships between household energy use behaviors are estimated using a unique dataset of about 40 households and 20 showrooms in Bangladesh's Chapainawabganj and Bagerhat districts. Knowledge of energy consumption and energy efficiency technology options is found to be associated with household use of energy conservation practices. Household characteristics also influence household energy use behavior. Younger household cohorts are more likely to adopt energy-efficient technologies and energy conservation practices and place primary importance on energy saving for environmental reasons. Education also influences attitudes toward energy conservation in Bangladesh. Low-education households indicate they primarily save electricity for the environment while high-education households indicate they are motivated by environmental concerns.
Applications of artificial Intelligence in Mechanical Engineering.pdfAtif Razi
Historically, mechanical engineering has relied heavily on human expertise and empirical methods to solve complex problems. With the introduction of computer-aided design (CAD) and finite element analysis (FEA), the field took its first steps towards digitization. These tools allowed engineers to simulate and analyze mechanical systems with greater accuracy and efficiency. However, the sheer volume of data generated by modern engineering systems and the increasing complexity of these systems have necessitated more advanced analytical tools, paving the way for AI.
AI offers the capability to process vast amounts of data, identify patterns, and make predictions with a level of speed and accuracy unattainable by traditional methods. This has profound implications for mechanical engineering, enabling more efficient design processes, predictive maintenance strategies, and optimized manufacturing operations. AI-driven tools can learn from historical data, adapt to new information, and continuously improve their performance, making them invaluable in tackling the multifaceted challenges of modern mechanical engineering.
Software Engineering and Project Management - Software Testing + Agile Method...Prakhyath Rai
Software Testing: A Strategic Approach to Software Testing, Strategic Issues, Test Strategies for Conventional Software, Test Strategies for Object -Oriented Software, Validation Testing, System Testing, The Art of Debugging.
Agile Methodology: Before Agile – Waterfall, Agile Development.
Optimizing Gradle Builds - Gradle DPE Tour Berlin 2024Sinan KOZAK
Sinan from the Delivery Hero mobile infrastructure engineering team shares a deep dive into performance acceleration with Gradle build cache optimizations. Sinan shares their journey into solving complex build-cache problems that affect Gradle builds. By understanding the challenges and solutions found in our journey, we aim to demonstrate the possibilities for faster builds. The case study reveals how overlapping outputs and cache misconfigurations led to significant increases in build times, especially as the project scaled up with numerous modules using Paparazzi tests. The journey from diagnosing to defeating cache issues offers invaluable lessons on maintaining cache integrity without sacrificing functionality.
Embedded machine learning-based road conditions and driving behavior monitoringIJECEIAES
Car accident rates have increased in recent years, resulting in losses in human lives, properties, and other financial costs. An embedded machine learning-based system is developed to address this critical issue. The system can monitor road conditions, detect driving patterns, and identify aggressive driving behaviors. The system is based on neural networks trained on a comprehensive dataset of driving events, driving styles, and road conditions. The system effectively detects potential risks and helps mitigate the frequency and impact of accidents. The primary goal is to ensure the safety of drivers and vehicles. Collecting data involved gathering information on three key road events: normal street and normal drive, speed bumps, circular yellow speed bumps, and three aggressive driving actions: sudden start, sudden stop, and sudden entry. The gathered data is processed and analyzed using a machine learning system designed for limited power and memory devices. The developed system resulted in 91.9% accuracy, 93.6% precision, and 92% recall. The achieved inference time on an Arduino Nano 33 BLE Sense with a 32-bit CPU running at 64 MHz is 34 ms and requires 2.6 kB peak RAM and 139.9 kB program flash memory, making it suitable for resource-constrained embedded systems.
Rainfall intensity duration frequency curve statistical analysis and modeling...bijceesjournal
Using data from 41 years in Patna’ India’ the study’s goal is to analyze the trends of how often it rains on a weekly, seasonal, and annual basis (1981−2020). First, utilizing the intensity-duration-frequency (IDF) curve and the relationship by statistically analyzing rainfall’ the historical rainfall data set for Patna’ India’ during a 41 year period (1981−2020), was evaluated for its quality. Changes in the hydrologic cycle as a result of increased greenhouse gas emissions are expected to induce variations in the intensity, length, and frequency of precipitation events. One strategy to lessen vulnerability is to quantify probable changes and adapt to them. Techniques such as log-normal, normal, and Gumbel are used (EV-I). Distributions were created with durations of 1, 2, 3, 6, and 24 h and return times of 2, 5, 10, 25, and 100 years. There were also mathematical correlations discovered between rainfall and recurrence interval.
Findings: Based on findings, the Gumbel approach produced the highest intensity values, whereas the other approaches produced values that were close to each other. The data indicates that 461.9 mm of rain fell during the monsoon season’s 301st week. However, it was found that the 29th week had the greatest average rainfall, 92.6 mm. With 952.6 mm on average, the monsoon season saw the highest rainfall. Calculations revealed that the yearly rainfall averaged 1171.1 mm. Using Weibull’s method, the study was subsequently expanded to examine rainfall distribution at different recurrence intervals of 2, 5, 10, and 25 years. Rainfall and recurrence interval mathematical correlations were also developed. Further regression analysis revealed that short wave irrigation, wind direction, wind speed, pressure, relative humidity, and temperature all had a substantial influence on rainfall.
Originality and value: The results of the rainfall IDF curves can provide useful information to policymakers in making appropriate decisions in managing and minimizing floods in the study area.
VARIABLE FREQUENCY DRIVE. VFDs are widely used in industrial applications for...PIMR BHOPAL
Variable frequency drive .A Variable Frequency Drive (VFD) is an electronic device used to control the speed and torque of an electric motor by varying the frequency and voltage of its power supply. VFDs are widely used in industrial applications for motor control, providing significant energy savings and precise motor operation.
VARIABLE FREQUENCY DRIVE. VFDs are widely used in industrial applications for...
Datarepresentation2
1. 1Data Representation
Computer Organization Computer Architectures Lab
DATA REPRESENTATION
Data Types
Complements
Fixed Point Representations
Floating Point Representations
Other Binary Codes
Error Detection Codes
2. 2Data Representation
Computer Organization Computer Architectures Lab
DATA REPRESENTATION
Information that a Computer is dealing with
* Data
- Numeric Data
Numbers( Integer, real)
- Non-numeric Data
Letters, Symbols
* Relationship between data elements
- Data Structures
Linear Lists, Trees, Rings, etc
* Program(Instruction)
Data Types
3. 3Data Representation
Computer Organization Computer Architectures Lab
NUMERIC DATA REPRESENTATION
R = 10 Decimal number system, R = 2 Binary
R = 8 Octal, R = 16 Hexadecimal
Radix point(.) separates the integer
portion and the fractional portion
Data
Numeric data - numbers(integer, real)
Non-numeric data - symbols, letters
Number System
Nonpositional number system
- Roman number system
Positional number system
- Each digit position has a value called a weight
associated with it
- Decimal, Octal, Hexadecimal, Binary
Base (or radix) R number
- Uses R distinct symbols for each digit
- Example AR = an-1 an-2 ... a1 a0 .a-1…a-m
- V(AR ) =
Data Types
∑
−
−=
1n
mi
i
i Ra
4. 4Data Representation
Computer Organization Computer Architectures Lab
WHY POSITIONAL NUMBER SYSTEM IN THE DIGITAL
COMPUTERS ?
Major Consideration is the COST and TIME
- Cost of building hardware
Arithmetic and Logic Unit, CPU,Communications
- Time to processing
Arithmetic - Addition of Numbers - Table for Addition
* Non-positional Number System
- Table for addition is infinite
--> Impossible to build, very expensive even
if it can be built
* Positional Number System
- Table for Addition is finite
--> Physically realizable, but cost wise
the smaller the table size, the less
expensive --> Binary is favorable to Decimal
0 1
0 0 1
1 1 10
0 1 2 3 4 5 6 7 8 9
0 0 1 2 3 4 5 6 7 8 9
1 1 2 3 4 5 6 7 8 9 10
2 2 3 4 5 6 7 8 9 1011
3 3 4 5 6 7 8 9 101112
4 4 5 6 7 8 9 10111213
5 5 6 7 8 9 1011121314
6 6 7 8 9 101112131415
7 7 8 9 10111213141516
8 8 9 1011121314151617
9 9 101112131415161718
Binary Addition Table
Decimal Addition Table
Data Types
6. 6Data Representation
Computer Organization Computer Architectures Lab
CONVERSION OF
BASES
Decimal to Base R number
Base R to Decimal Conversion
V(A) = Σ ak Rk
A = an-1 an-2 an-3 … a0 . a-1 … a-m
(736.4)8 = 7 x 82
+ 3 x 81
+ 6 x 80
+ 4 x 8-1
= 7 x 64 + 3 x 8 + 6 x 1 + 4/8 = (478.5)10
(110110)2 = ... = (54)10
(110.111)2 = ... = (6.785)10
(F3)16 = ... = (243)10
(0.325)6 = ... = (0.578703703 .................)10
- Separate the number into its integer and fraction parts and convert
each part separately.
- Convert integer part into the base R number
--> successive divisions by R and accumulation of the remainders.
- Convert fraction part into the base R number
--> successive multiplications by R and accumulation of integer
digits
Data Types
7. 7Data Representation
Computer Organization Computer Architectures Lab
EXAMPLE
Convert 41.687510 to base 2.
Integer = 41
41
20 1
10 0
5 0
2 1
1 0
0 1
Fraction = 0.6875
0.6875
x 2
1.3750
x 2
0.7500
x 2
1.5000
x 2
1.0000
(41)10 = (101001)2 (0.6875)10 = (0.1011)2
(41.6875)10 = (101001.1011)2
Convert (63)10 to base 5: (223)5
Convert (1863)10 to base 8: (3507)8
Convert (0.63671875)10 to hexadecimal: (0.A3)16
Exercise
Data Types
8. 8Data Representation
Computer Organization Computer Architectures Lab
COMPLEMENT OF NUMBERS
Two types of complements for base R number system:
- R's complement and (R-1)'s complement
The (R-1)'s Complement
Subtract each digit of a number from (R-1)
Example
- 9's complement of 83510 is 16410
- 1's complement of 10102 is 01012(bit by bit complement operation)
The R's Complement
Add 1 to the low-order digit of its (R-1)'s complement
Example
- 10's complement of 83510 is 16410 + 1 = 16510
- 2's complement of 10102 is 01012 + 1 = 01102
Complements
9. 9Data Representation
Computer Organization Computer Architectures Lab
FIXED POINT NUMBERS
Binary Fixed-Point Representation
X = xnxn-1xn-2 ... x1x0. x-1x-2 ... x-m
Sign Bit(xn): 0 for positive - 1 for negative
Remaining Bits(xn-1xn-2 ... x1x0. x-1x-2 ... x-m)
- Following 3 representations
Signed magnitude representation
Signed 1's complement representation
Signed 2's complement representation
Example: Represent +9 and -9 in 7 bit-binary number
Only one way to represent +9 ==> 0 001001
Three different ways to represent -9:
In signed-magnitude: 1 001001
In signed-1's complement: 1 110110
In signed-2's complement: 1 110111
Numbers: Fixed Point Numbers and Floating Point Numbers
In general, in computers, fixed point numbers are represented
either integer part only or fractional part only.
Fixed Point Representations
10. 10Data Representation
Computer Organization Computer Architectures Lab
CHARACTERISTICS OF 3 DIFFERENT REPRESENTATIONS
Complement
Signed magnitude: Complement only the sign bit
Signed 1's complement: Complement all the bits including sign bit
Signed 2's complement: Take the 2's complement of the number,
including its sign bit.
Maximum and Minimum Representable Numbers and Representation of Zero
X = xn xn-1 ... x0 . x-1 ... x-m
Signed Magnitude
Max: 2n
- 2-m
011 ... 11.11 ... 1
Min: -(2n
- 2-m
) 111 ... 11.11 ... 1
Zero: +0 000 ... 00.00 ... 0
-0 100 ... 00.00 ... 0
Signed 1’s Complement
Max: 2n
- 2-m
011 ... 11.11 ... 1
Min: -(2n
- 2-m
) 100 ... 00.00 ... 0
Zero: +0 000 ... 00.00 ... 0
-0 111 ... 11.11 ... 1
Fixed Point Representations
Signed 2’s Complement
Max: 2n
- 2-m
011 ... 11.11 ... 1
Min: -2n
100 ... 00.00 ... 0
Zero: 0 000 ... 00.00 ... 0
11. 11Data Representation
Computer Organization Computer Architectures Lab
ARITHMETIC ADDITION: SIGNED MAGNITUDE
[1] Compare their signs
[2] If two signs are the same ,
ADD the two magnitudes - Look out for an overflow
[3] If not the same , compare the relative magnitudes of the numbers and
then SUBTRACT the smaller from the larger --> need a subtractor to add
[4] Determine the sign of the result
6 0110
+) 9 1001
15 1111 -> 01111
9 1001
- ) 6 0110
3 0011 -> 00011
9 1001
-) 6 0110
- 3 0011 -> 10011
6 0110
+) 9 1001
-15 1111 -> 11111
6 + 9 -6 + 9
6 + (- 9) -6 + (-9)
Overflow 9 + 9 or (-9) + (-9)
9 1001
+) 9 1001
(1)0010overflow
Fixed Point Representations
12. 12Data Representation
Computer Organization Computer Architectures Lab
ARITHMETIC ADDITION: SIGNED 2’s
COMPLEMENT
Example
6 0 0110
9 0 1001
15 0 1111
-6 1 1010
9 0 1001
3 0 0011
6 0 0110
-9 1 0111
-3 1 1101
-9 1 0111
-9 1 0111
-18 (1)0 1110
Add the two numbers, including their sign bit, and discard any carry out of
leftmost (sign) bit
overflow9 0 1001
9 0 1001+)
+) +)
+) +)
18 1 0010 2 operands have the same sign
and the result sign changes
xn-1yn-1s’n-1 + x’n-1y’n-1sn-1
x’n-1y’n-1sn-1
(cn-1 ⊕ cn)
xn-1yn s’n-1
(cn-1 ⊕ cn)
Fixed Point Representations
13. 13Data Representation
Computer Organization Computer Architectures Lab
ARITHMETIC ADDITION: SIGNED 1’s
COMPLEMENT
Add the two numbers, including their sign bits.
- If there is a carry out of the most significant (sign) bit, the result is
incremented by 1 and the carry is discarded.
6 0 0110
-9 1 0110
-3 1 1100
-6 1 1001
9 0 1001
(1) 0(1)0010
1
3 0 0011
+) +)
+)
end-around carry
-9 1 0110
-9 1 0110
(1)0 1100
1
0 1101
+)
+)
9 0 1001
9 0 1001
1 (1)0010
+)
overflow
Example
not overflow (cn-1 ⊕ cn) = 0
(cn-1 ⊕ cn)
Fixed Point Representations
14. 14Data Representation
Computer Organization Computer Architectures Lab
COMPARISON OF REPRESENTATIONS
* Easiness of negative conversion
S + M > 1’s Complement > 2’s Complement
* Hardware
- S+M: Needs an adder and a subtractor for Addition
- 1’s and 2’s Complement: Need only an adder
* Speed of Arithmetic
2’s Complement > 1’s Complement(end-around C)
* Recognition of Zero
2’s Complement is fast
Fixed Point Representations
15. 15Data Representation
Computer Organization Computer Architectures Lab
ARITHMETIC SUBTRACTION
Take the complement of the subtrahend (including the sign bit)
and add it to the minuend including the sign bits.
( ± A ) - ( - B ) = ( ± A ) + B
( ± A ) - B = ( ± A ) + ( - B )
Fixed Point Representations
Arithmetic Subtraction in 2’s complement
16. 16Data Representation
Computer Organization Computer Architectures Lab
FLOATING POINT NUMBER REPRESENTATION
* The location of the fractional point is not fixed to a certain location
* The range of the representable numbers is wide
F = EM
mn ekek-1 ... e0 mn-1mn-2 … m0 . m-1 … m-m
sign exponent mantissa
- Mantissa
Signed fixed point number, either an integer or a fractional number
- Exponent
Designates the position of the radix point
Decimal Value
V(F) = V(M) * RV(E) M: Mantissa
E: Exponent
R: Radix
Floating Point Representation
17. 17Data Representation
Computer Organization Computer Architectures Lab
FLOATING POINT NUMBERS
0 .1234567 0 04
sign sign
mantissa exponent
==> +.1234567 x 10+04
Example
A binary number +1001.11 in 16-bit floating point number representation
(6-bit exponent and 10-bit fractional mantissa)
0 0 00100 100111000
0 0 00101 010011100
Example
Note:
In Floating Point Number representation, only Mantissa(M) and
Exponent(E) are explicitly represented. The Radix(R) and the position
of the Radix Point are implied.
Exponent MantissaSign
or
Floating Point Representation
18. 18Data Representation
Computer Organization Computer Architectures Lab
CHARACTERISTICS OF FLOATING POINT NUMBER REPRESENTATIONS
Normal Form
- There are many different floating point number representations of
the same number
--> Need for a unified representation in a given computer
- the most significant position of the mantissa contains a non-zero digit
Representation of Zero
- Zero
Mantissa = 0
- Real Zero
Mantissa = 0
Exponent
= smallest representable number
which is represented as
00 ... 0
<-- Easily identified by the hardware
Floating Point Representation
19. 19Data Representation
Computer Organization Computer Architectures Lab
INTERNAL REPRESENTATION AND EXTERNAL REPRESENTATION
CPU
Memory
Internal
Representation
Human
Device
Another
Computer
External
Representation
External
Representation
External
Representation
External Representations Internal Representations
- Presentability - Efficiency
- Efficiency Memory space
Communication Processing time
Reliability - Easy to convert to
- Easy to handle external representation
- BCD, ASCII, EBCDIC - Fixed and Floating points
20. 20Data Representation
Computer Organization Computer Architectures Lab
EXTERNAL REPRESENTATION
Decimal BCD Code
0 0000
1 0001
2 0010
3 0011
4 0100
5 0101
6 0110
7 0111
8 1000
9 1001
Numbers
Most of numbers stored in the computer are eventually changed
by some kinds of calculations
--> Internal Representation for calculation efficiency
--> Final results need to be converted to as External Representation
for presentability
Alphabets, Symbols, and some Numbers
Elements of these information do not change in the course of processing
--> No needs for Internal Representation since they are not used
for calculations
--> External Representation for processing and presentability
Example
Decimal Number: 4-bit Binary Code
BCD(Binary Coded Decimal)
External Representations
21. 21Data Representation
Computer Organization Computer Architectures Lab
OTHER DECIMAL CODES
Decimal BCD(8421) 2421 84-2-1 Excess-3
0 0000 0000 0000 0011
1 0001 0001 0111 0100
2 0010 0010 0110 0101
3 0011 0011 0101 0110
4 0100 0100 0100 0111
5 0101 1011 1011 1000
6 0110 1100 1010 1001
7 0111 1101 1001 1010
8 1000 1110 1000 1011
9 1001 1111 1111 1100 d3 d2 d1 d0: symbol in the codes
BCD: d3 x 8 + d2 x 4 + d1 x 2 + d0 x 1
==> 8421 code.
2421: d3 x 2 + d2 x 4 + d1 x 2 + d0 x 1
84-2-1: d3 x 8 + d2 x 4 + d1 x (-2) + d0 x (-1)
Excess-3: BCD + 3
Note: 8,4,2,-2,1,-1 in this table is the weight
associated with each bit position.
BCD: It is difficult to obtain the 9's complement.
However, it is easily obtained with the other codes listed above.
==> Self-complementing codes
External Representations
23. 23Data Representation
Computer Organization Computer Architectures Lab
GRAY CODE - ANALYSIS
Letting gngn-1 ... g1 g0 be the (n+1)-bit Gray code
for the binary number bnbn-1 ... b1b0
gi = bi ⊕ bi+1 , 0 ≤ i ≤ n-1
gn = bn
and
bn-i = gn ⊕ gn-1 ⊕ . . . ⊕ gn-i
bn = gn
0 0 0 0 00 0 000
1 0 1 0 01 0 001
1 1 0 11 0 011
1 0 0 10 0 010
1 10 0 110
1 11 0 111
1 01 0 101
1 00 0 100
1 100
1 101
1 111
1 010
1 011
1 001
1 101
1 000
The Gray code has a reflection property
- easy to construct a table without calculation,
- for any n: reflect case n-1 about a
mirror at its bottom and prefix 0 and 1
to top and bottom halves, respectively
Reflection of Gray codes
Note:
Other Binary codes
ε
24. 24Data Representation
Computer Organization Computer Architectures Lab
CHARACTER REPRESENTATION ASCII
ASCII (American Standard Code for Information Interchange) Code
Other Binary codes
0
1
2
3
4
5
6
7
8
9
A
B
C
D
E
F
NUL
SOH
STX
ETX
EOT
ENQ
ACK
BEL
BS
HT
LF
VT
FF
CR
SO
SI
SP
!
“
#
$
%
&
‘
(
)
*
+
,
-
.
/
0
1
2
3
4
5
6
7
8
9
:
;
<
=
>
?
@
A
B
C
D
E
F
G
H
I
J
K
L
M
N
O
P
Q
R
S
T
U
V
W
X
Y
Z
[
]
m
n
‘
a
b
c
d
e
f
g
h
I
j
k
l
m
n
o
P
q
r
s
t
u
v
w
x
y
z
{
|
}
~
DEL
0 1 2 3 4 5 6 7
DLE
DC1
DC2
DC3
DC4
NAK
SYN
ETB
CAN
EM
SUB
ESC
FS
GS
RS
US
LSB
(4 bits)
MSB (3 bits)
25. 25Data Representation
Computer Organization Computer Architectures Lab
CONTROL CHARACTER REPRESENTAION (ACSII)
NUL Null
SOH Start of Heading (CC)
STX Start of Text (CC)
ETX End of Text (CC)
EOT End of Transmission (CC)
ENQ Enquiry (CC)
ACK Acknowledge (CC)
BEL Bell
BS Backspace (FE)
HT Horizontal Tab. (FE)
LF Line Feed (FE)
VT Vertical Tab. (FE)
FF Form Feed (FE)
CR Carriage Return (FE)
SO Shift Out
SI Shift In
DLE Data Link Escape (CC)
(CC) Communication Control
(FE) Format Effector
(IS) Information Separator
Other Binary codes
DC1 Device Control 1
DC2 Device Control 2
DC3 Device Control 3
DC4 Device Control 4
NAK Negative Acknowledge (CC)
SYN Synchronous Idle (CC)
ETB End of Transmission Block (CC)
CAN Cancel
EM End of Medium
SUB Substitute
ESC Escape
FS File Separator (IS)
GS Group Separator (IS)
RS Record Separator (IS)
US Unit Separator (IS)
DEL Delete
26. 26Data Representation
Computer Organization Computer Architectures Lab
ERROR DETECTING CODES
Parity System
- Simplest method for error detection
- One parity bit attached to the information
- Even Parity and Odd Parity
Even Parity
- One bit is attached to the information so that
the total number of 1 bits is an even number
1011001 0
1010010 1
Odd Parity
- One bit is attached to the information so that
the total number of 1 bits is an odd number
1011001 1
1010010 0
Error Detecting codes
27. 27Data Representation
Computer Organization Computer Architectures Lab
Parity Bit Generation
For b6b5... b0(7-bit information); even parity bit beven
beven = b6 ⊕ b5 ⊕ ... ⊕ b0
For odd parity bit
bodd = beven ⊕ 1 = beven
PARITY BIT GENERATION