Skip to content

Instantly share code, notes, and snippets.

@armanhakimsagar
Created August 20, 2018 06:14
Show Gist options
  • Save armanhakimsagar/f3bc3bab57bde23920031a916e6281b4 to your computer and use it in GitHub Desktop.
Save armanhakimsagar/f3bc3bab57bde23920031a916e6281b4 to your computer and use it in GitHub Desktop.
Number system :
binary number system (base 2 number system) : 0 1 (101)^2
decimal number system (base 10 number system) : 0123456789 (57)^10
octal number system (base 8 number system) : 01234567 (623)^8
Hexadecimal number system (base 16 number system) : A-F 0123456789 (AF09)^2
Decimal to binary : https://www.youtube.com/watch?v=iNn9KY45hnQ&list=PLWnrxMxuatxOpOXRZRTeMKWLWWzdDxTW3
convert any decimal to binary :
devide by 2 , vagses will be binary.
convert 29.30
2|29
2|14 1
2|7 0
2|3 1
2|1 1
2|2 1
so binary is : 11101 (bottom to top)
convert .30 .for fraction multiply by 2 (if more than 1 start again).
.30
x2
0.60
x2
1.20
x2
0.40
so binary is : 010 (top to bottom)
So total : 11101.010
Same for decimal to octal : devide by 8 (for full number) & multy by 8 (for fraction number)
same for decimal to hexadecimal : devide by 16 (for full number) & multy by 16 (for fraction number)
binary to decimal : https://www.youtube.com/watch?v=ep0o6jxa1p4
For convert first count total number.
then devide by 2.
then multiply by 1x 2^2 + 1x2^1 + 1x2^0 + 1x2^-1 + 1x2^2
prime number : number that can devide by 1 & himself
Make a algorithom of prime number. (check by root of prime number)
Factor of a number : 1 number divide by how many number . 12 can divide by : 12,6,2,3,4,1 (so 12 have 5 factor)
Make a algorithom of factor number.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment