ثماني إلى عشري أداة تحويل عبر الإنترنت

8 أكتوبر

عشري 10

الهيكس 16

ثنائي 2

فيثماني إلى عشري أداة تحويل عبر الإنترنت:

تساعدك أداة التحويل العشرية الثماني هذه على تحويل رقم ثماني إلى رقم عشري.

أوكتال (أوكتال):

يحتوي نظام الأعداد الثماني على 16 حرفًا (0, 1, 2, 3, 4, 5, 6, 7) ، ويمكن لكل رقم ثماني أن يمثل رقمًا ثنائيًا مكونًا من 3 أرقام.

عشري (عشري):

يحتوي نظام الأرقام العشري (المعروف أيضًا بالعربية) على 10 أحرف ، بما في ذلك (0, 1, 2, 3, 4, 5, 6, 7, 8, 9) ، وهو النظام الرقمي الأكثر استخدامًا في حياتنا اليومية.

comic octal to decimal

كيفية إجراء تحويل ثماني إلى عشري؟

للأرقام الثمانية المكونة n كما هو موضح بالصورة التالية:

dn-1dn-2...d2d1d0

لكل رقم من الرقم ، اضرب بالرقم المناظر لقوة 8.

Decimal Output = dn-1 × 8n-1 + ... + d1 × 81 + d0 × 80

مثال 1: يتم تحويل رقم ثماني "2023" إلى رقم عشري:

Decimal Output = 2 × 83 + 0 × 82 + 2 × 81 + 3 × 80 = 1043

مثال 2: يتم تحويل رقم ثماني "3.14" إلى رقم عشري:

Decimal Output = 3 × 80 + 1 × 8-1 + 4 × 8-2 = 3.3125

ثماني إلى عشري جدول تحويل:

أوكتال عشري أوكتال عشري
1 1 30 24
2 2 40 32
3 3 50 40
4 4 60 48
5 5 70 56
6 6 100 64
7 7 110 72
10 8 120 80
11 9 130 88
12 10 140 96
13 11 150 104
14 12 160 112
15 13 170 120
16 14 200 128
17 15 300 192
20 16 200 512
21 17 300 768
22 18 400 256
23 19 500 320
24 20 600 384

صلة:

ويكيبيديا (ثماني): https://en.wikipedia.org/wiki/Octal

ويكيبيديا (عشري): https://en.wikipedia.org/wiki/Decimal

Octal to decimal conversion in Python:

def octal_to_decimal(octal_str):
    decimal_number = int(octal_str, 8)
    return decimal_number


octal_input = '747'
decimal_output = octal_to_decimal(octal_input)
print('decimal result is:{0}'.format(decimal_output))

-------------------
decimal result is:487

Octal to decimal conversion in Java:

public class NumberConvertManager {
    public static int octal_to_decimal(String octal_str) {
        return Integer.parseInt(octal_str, 8);
    }

    public static void main(String[] args) {
        String octal_input = "747";
        int decimal_output = octal_to_decimal(octal_input);
        System.out.println("decimal result is:" + decimal_output);
    }
}

-------------------
decimal result is:487