10.9k views
3 votes
Define four symbolic constants that represent integer 25 in decimal, binary, octal, and hexadecimal formats

1 Answer

2 votes

Answer:

1) Decimal
25= (25)_(10)

2) Binary
25= (11001)_2

3) Octal
25= (31)_8

4) Hexadecimal
25= (19)_(16)

Explanation:

Given : Integer is 25

To find : Represent integer in decimal, binary, octal, and hexadecimal formats.

Solution :

1) Integer into decimal - To convert into decimal the base goes to 10.

So,
25= (25)_(10)

2) Integer into binary - To convert into binary the base goes to 2, it form in 0 and 1 and we divide integer by 2.

Divide 25 by 2 and note down the remainders.

2 | 25

2 | 12 R=1 ←

2 | 6 R=0 ↑

2 | 3 R=0 ↑

2 | 1 → R=1 ↑

So,
25= (11001)_2

3) Integer into octal - To convert into octal the base goes to 8 and we divide integer by 8.

Divide 25 by 8 and note down the remainders.

8 | 25

| 3 → R=1

So,
25= (31)_8

4) Integer into hexadecimal - To convert into hexadecimal the base goes to 16 and we divide integer by 16.

Divide 25 by 16 and note down the remainders.

16 | 25

| 1 → R=9

So,
25= (19)_(16)

User Pezetem
by
8.6k points