Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

In this assignment you are asked to solve a problem using 3 different programming languages: Python(33.33%), Ada (33.33%) and VB(33.33%). You are required to find

In this assignment you are asked to solve a problem using 3 different programming languages: Python(33.33%), Ada (33.33%) and VB(33.33%). You are required to find a compiler for each of the mention languages and test them on your own machines.image text in transcribed

Caicuiating Binary In this assignment, you are asked to solve a problem using 3 different programming languages: Python (33.33%), Ada (33.33%), and VB (33.33%). You are required to find a compiler for each of the mentioned languages and test them on your own machines. The Problem Given a binary String as input, composed of 0's and 1's, give the decimal value for the input. Algorithm Given a binary string, b, of size, n, indexed 0,1,2,..., n -1. Denote character's integer value of b as bi such that 1-0, 1, 2, , n-1. The decimal value, d bn-, X 20 + bn-2 21 + + bo 2n-1. Sample Output Enter a binary 120013 Error: Not a binary Enter a binary: 1010w10 Error: Not a binary Enter a binary 100A11 Error: Not a binary Enter a binary Ahmed Error: Not a binary Enter a binary 10101010101111 Binary value ize: 14 1*2-0 + 1*2-1 + 1*2-2 + 1*2-3 + 0*2-4 + 1*2-5 + 0*2-6 + 1+2^7 + 0*2-8 + 1*2-9 + 0*2-10 + 1*2-11 + 0-2 ^ 12 + 1*2-13

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Advanced Database Systems For Integration Of Media And User Environments 98

Authors: Yahiko Kambayashi, Akifumi Makinouchi, Shunsuke Uemura, Katsumi Tanaka, Yoshifumi Masunaga

1st Edition

9810234368, 978-9810234362

More Books

Students also viewed these Databases questions