Number System - ICSE Java Expert

Breaking

ICSE Java Expert

Learn Java for school

Unordered List

WELCOME

Thursday, August 09, 2018

Number System

Number System

There are 4 number systems:


When we want to convert a decimal number to any number system then we divide the number by particular base number.

When we want to convert from any number system to decimal number system then we multiply each digit of the number with the increasing powers of the base number and add all terms.




1 comment:


  1. public class numberSystem
    {

    public int dec2bin(int n)
    {
    if(n==1)
    return 1;
    else
    return dec2bin(n/2)*10+n%2;

    }
    }

    ReplyDelete