Computer Number Systems – Number systems definition, types of ... [PDF]

What are the number systems ? Number systems are the technique to represent numbers in the computer system architecture,

4 downloads 21 Views 245KB Size

Recommend Stories


Number Systems
Live as if you were to die tomorrow. Learn as if you were to live forever. Mahatma Gandhi

NUMBER SYSTEMS AND CODES [PDF]
Octal system has certain advantages in digital work because it requires less circuitry to get information into and out of a digital system. Moreover, it is easier to read, record and print out octal numbers than binary numbers. Hexadecimal number sys

MATH 330: Number Systems
The butterfly counts not months but moments, and has time enough. Rabindranath Tagore

Arithmetic and number systems
Never wish them pain. That's not who you are. If they caused you pain, they must have pain inside. Wish

Generalized signed-digit number systems
Come let us be friends for once. Let us make life easy on us. Let us be loved ones and lovers. The earth

On the Turan number of Triple Systems
Be like the sun for grace and mercy. Be like the night to cover others' faults. Be like running water

PDF Computer Systems
Courage doesn't always roar. Sometimes courage is the quiet voice at the end of the day saying, "I will

[PDF] Computer Systems
You can never cross the ocean unless you have the courage to lose sight of the shore. Andrè Gide

Chapter 2 Binary Values and Number Systems
The butterfly counts not months but moments, and has time enough. Rabindranath Tagore

Computer Systems
Ego says, "Once everything falls into place, I'll feel peace." Spirit says "Find your peace, and then

Idea Transcript


HOME

C

C++

MORE

SOLVED PROGRAMS

APTITUDE

INTERVIEW

OTHER

CATEGORIES

C C++ Java Data Structure Python JavaScript CSS Ajax PL/SQL PHP Puzzles C programs C++ programs Java programs

Home » Misc Stuffs

Computer Number Systems What are the number systems ? Number systems are the technique to represent numbers in the computer system architecture, every value that you are saving or getting into/from computer memory has a defined number system. Computer architecture supports following number systems. Binary number system Octal number system Decimal number system Hexadecimal (hex) number system

1) Binary Number System A Binary number system has only two digits that are 0 and 1. Every number (value) represents with 0 and 1 in this number system. The base of binary number system is 2, because it has only two digits.

2) Octal number system Octal number system has only eight (8) digits from 0 to 7. Every number (value) represents with 0,1,2,3,4,5,6 and 7 in this number system. The base of octal number system is 8, because it has only 8 digits.

3) Decimal number system Decimal number system has only ten (10) digits from 0 to 9. Every number (value) represents with 0,1,2,3,4,5,6, 7,8 and 9 in this number system. The base of decimal number system is 10, because it has only 10 digits.

4) Hexadecimal number system A Hexadecimal number system has sixteen (16) alphanumeric values from 0 to 9 and A to F. Every number (value) represents with 0,1,2,3,4,5,6, 7,8,9,A,B,C,D,E and F in this number system. The base of hexadecimal number system is 16, because it has 16 alphanumeric values. Here A is 10, B is 11, C is 12, D is 13, E is 14 and F is 15. Table of the Numbers Systems with Base, Used Digits, Representation, C language representation: Number system

Base

Used digits

Example

C Language assignment

Binary

2

0,1

(11110000)2

int val=0b11110000;

Octal

8

0,1,2,3,4,5,6,7

(360)8

int val=0360;

Decimal

10

0,1,2,3,4,5,6,7,8,9

(240)10

int val=240;

Hexadecimal

16

0,1,2,3,4,5,6,7,8,9, A,B,C,D,E,F

(F0)16

int val=0xF0;

Number System Conversions There are three types of conversion: Decimal Number System to Other Base [for example: Decimal Number System to Binary Number System]

Other Base to Decimal Number System [for example: Binary Number System to Decimal Number System]

Other Base to Other Base [for example: Binary Number System to Hexadecimal Number System]

Decimal Number System to Other Base To convert Number system from Decimal Number System to Any Other Base is quite easy; you have to follow just two steps: A) Divide the Number (Decimal Number) by the base of target base system (in which you want to convert the number: Binary (2), octal (8) and Hexadecimal (16)). B) Write the remainder from step 1 as a Least Signification Bit (LSB) to Step last as a Most Significant Bit (MSB). Decimal to Binary Conversion

Result

Decimal Number is : (12345)10

Binary Number is (11000000111001)2

Decimal to Octal Conversion

Result

Decimal Number is : (12345)10

Octal Number is (30071)8

Decimal to Hexadecimal Conversion

Result

Example 1 Decimal Number is : (12345)10

Hexadecimal Number is (3039)16

Example 2 Decimal Number is : (725)10

Hexadecimal Number is (2D5)16 Convert 10, 11, 12, 13, 14, 15 to its equivalent... A, B, C, D, E, F

Other Base System to Decimal Number Base To convert Number System from Any Other Base System to Decimal Number System, you have to follow just three steps: A) Determine the base value of source Number System (that you want to convert), and also determine the position of digits from LSB (first digit’s position – 0, second digit’s position – 1 and so on). B) Multiply each digit with its corresponding multiplication of position value and Base of Source Number System’s Base. C) Add the resulted value in step-B.

Explanation regarding examples: Below given exams contains the following rows: A) Row 1 contains the DIGITs of number (that is going to be converted). B) Row 2 contains the POSITION of each digit in the number system. C) Row 3 contains the multiplication: DIGIT* BASE^POSITION. D) Row 4 contains the calculated result of step C. E) And then add each value of step D, resulted value is the Decimal Number.

Binary to Decimal Conversion Binary Number is : (11000000111001)2

Octal to Decimal Conversion

Result

Octal Number is : (30071)8

=12288+0+0+56+1 =12345 Decimal Number is: (12345)10



Hexadecimal to Decimal Conversion

Result

Hexadecimal Number is : (2D5)16

=512+208+5 =725 Decimal Number is: (725)10

~ RECENT POSTS ~ IncludeHelp wishing you a Happy New Year (Year - 2018) Hello friends,Wishing you and your family a Happy New Year!

Machine Learning/ Artificial Intelligence/ Deep Learning/ Data Science Machine Learning/ Artificial Intelligence/ Deep Learning/ Data Science: Well, this is the very first article on Machine Learning and its brother subjects. Before we proceed into studying further, it must be noted that all of these are often considered to be same...

Run code in comments in Java In this article, we will discuss about a simple trick in java to run code written in comments.

Insertion in AVL Tree using C program Here, we are implementing a C program that will insert value (item) to an AVL Tree.

SQL Query to merge N columns as single column from a table Here, we will learn how to merge N columns as a single column from a table using SQL Query?

SQL Query to fetch (print) Even and Odd records from a table Here, we will learn how to create a SQL Query that will fetch (print) Even and Odd numbers.

COMMENTS

solved programs: » c » c++ » java » ds » C# » scala programming languages: » c » c++ » java » ds » python » pl/sql » .Net web technologies: » php » javascript » css » ajax aptitude questions: » c » c++ » java » dbms interview questions: » c » java » seo

most viewed pages: C language solved programs C++ language solved programs C switch case programs Basic Input, Output C programs Infix to postfix conversion using stack in C C programming Aptitude Que. and Ans. Core java programs Computer number systems & conversions Java solved programs C++ file handling programs Recursion programs in C More pages...

categories: C , C++ , Java , D.S. , Python , .Net , SQL , PL/SQL , Ajax , PHP , JavaScript , CSS , HTML , C programs , C++ programs , Java programs , C# programs , DS programs , C aptitude , C++ aptitude , Java aptitude , DBMS aptitude , O.S. , Networking , Embedded systems , Nanotechnologies , Linux , DOS , puzzles , syntaxes ,

featured posts: Difference between %d and %i in C language. Difference between printf and sprintf in C language. Difference between Sentinel and Counter Controlled loop in C language. Difference between Entry Control and Exit Control loop in C language. Difference between Unary and Binary Operators in C language. Difference between = (Assignment) and == (Equal to) Operators in C language. Difference between & (Address Of) and && (Logical AND) Operators in C language. Difference between Local and Global variables in C.

c tips and tricks: C - Fastest way to copy two bytes integer number (short int) into byte buffer. C - Pre-Increment is faster than post-increment. C - How to create delay function according to program need? Why should we use 'f' with float literal in C? Replacing a part of string in C. Comparing fixed number of characters of two strings in C language. A safest way to check value using 'Equal To' (==) operator in C. Check EVEN or ODD without using Modulus (%) Operator in C. How can we use a single byte to store 8 values in C? A funny trick to use C++ in C language program. An amazing trick to print maximum value of an unsigned integer in C.

# About # Advertise # Contact # Feedback # Internship # Certificates # Jobs # Personal blogs # Guest posting # Subscribe

Keywords (like Linux, Java, Oracle etc) used in this website are the trademarks of their respective owners/company. This website is not affiliated to any company. The tutorials are designed by includehelp Team with the help of well known books and other online resources. These Tutorials are free for all, for learning purposes only. Enjoy learning:) Copyright © 2015 - 2017. All Rights Reserved.

Smile Life

When life gives you a hundred reasons to cry, show life that you have a thousand reasons to smile

Get in touch

© Copyright 2015 - 2024 PDFFOX.COM - All rights reserved.