# What is Decimal Number System?

Long ago, humans created a number system that has precisely ten digits. This number system is called the Decimal Number System, and the digits in this number system are 0, 1, 2, 3, 4, 5, 6, 7, 8, 9.

The decimal number system is the standard for denoting integer and non-integer numbers.

## Introduction

Long ago, humans created a number system that has precisely ten digits.

This number system is called the Decimal Number System, and the digits in this number system are 0, 1, 2, 3, 4, 5, 6, 7, 8, 9.

If a number system has n digits, we say that the base of the number system is n. So, the decimal number system can also be called a `base-10` number system.

## Sketch with place values.

Let’s look at place values for decimals in the below picture.

We write the number in one row and multiple columns. The rightmost column corresponding to the rightmost digit is called the one’s place. The second right column is called the tens place, and we increase in multiples of tens, e.g., hundreds place, thousands place, and so on.

Suppose we have to represent this in powers of 10. In that case, the rightmost place (or the least significant digit) corresponds to 100 and continues to 101 and so on towards the left side.

## Example

Let’s write the number 1256 in the decimal number system.

`int n = 1256;`

Repeatedly do the modulo operation until `n` becomes `0` using:

`%`” and “`division`” operations.

## Illustration

n(value) n n/10 (Quotient) n%10 (Remainder)
n is 1256 1256 125 6
n/10 becomes 125 125 12 5
n/10 becomes 12 12 1 2
n/10 becomes 1 1 0 1

Let's visualize this below:

Bit ManipulationData Structures and Algorithms

Gopi is an engineering leader with 12+ of experience in full-stack development—a specialist in Java technology stack. He worked for multiple startups, the European govt, and FAANG in India and Europe.

Members Public

## Leetcode 217: Contains Duplicate

This question marks the first problem when working on duplicate data, either integers or strings etc. Companies that have asked this in their coding interview are Amazon, Apple, Netflix, Google, Microsoft, Adobe, Facebook, and many more top tech companies. Problem statement Given an integer array nums, return true if any

Members Public

## Leetcode 121: Best Time To Buy and Sell Stock

The Best time to buy and sell stock problem is a classic problem that can be solved using the Greedy approach. This is one of the most popular questions asked in such interviews. Companies that have asked this in their coding interview are Facebook, Amazon, Apple, Netflix, Google, Microsoft, Adobe,

Members Public

## Bit Manipulation Course Overview

Overview In this course, you will learn how to solve problems using bit manipulation, a powerful technique that can be used to optimize your algorithmic and problem-solving skills. This is one of the most important/critical topics when someone starts preparing for coding interviews for FAANG companies. To kick things