Convert file of strings to a base64 encoding

Assignment Help Assembly Language
Reference no: EM13759227

Take a file of strings (Which may be binary data) and convert those string to a Base64 encoding.

The encoding scheme to use is the same as that used in rfc1421.

Base64 encoding is a process by which three binary characters are encoded and replaced with 4 text characters. Text characters include A-Z, a-z, 0-9,+,/ (these are all easily printable characters and don't pose any problems to communication software, such as email.) We also use the '=' to represent "padded" characters.

So... Three characters is three bytes, three bytes is 24 bits. But you are going to divide these 24 bits into 4 sets of 6 bits. 2^6 = 64, hence base "64" encoding.

The subsequence "ABC" in a string would have the ASCII values 65 (01000001), 66 (01000010), and 67 (01000011) for a total 24 bit sequence of 010000010100001001000011. Chunking this into 6-bits chunks yields... 010000 010100 001001 000011. As 4 numbers this is 16, 20, 9, and 3. in RFC1421 this equates to the replacement sequence "QUJD"

If the number of letters in a string is not divisible for 3 pad it with = signs.

So take a file of multiple strings, Encode each line in RFC1421 Base64 encoding and output that line to a new file.

THe input file is called "input.txt" the output file shall be named "output64.txt"

Each input line will be less than 1024 characters

Each line may include binary data but will not include carriage return ('\r') or newline ('\n').

Each line will be terminated by the two character end of line sequence ("\r\n")

Reference no: EM13759227

Questions Cloud

Ecosystems : In this assignment, you will investigate the biotic and abiotic structure and function of an ecosystem. You will also investigate how ecosystems recover from disturbance naturally and through human restoration.
Discuss the significance of the independent film movement : American Film and Society Since 1945, or other cited sources. Discuss the significance of the Independent Film Movement in the 1990s. Examine some films or other breakthroughs in Independent Cinema.
Accommodate the network traffic : XUMUC is has the WAN links in place to the new locations in the Houston Region. XUMUC currently has 2 other Regions San Francisco and Denver.
What are some arguments for and against globalisation : Discuss some contrasting views and perspectives in relation to globalisation. What are some arguments for and against Globalisation?
Convert file of strings to a base64 encoding : Take a file of strings (Which may be binary data) and convert those string to a Base64 encoding.
What were the causes of and possible remedies for problem : Recall a time when you experienced a problem as result of poor communication. What were the causes of and possible remedies for the problem?
Calculate the expected rate of return for the portfolio : Calculate the expected rate of return for each stock separately and calculate the expected rate of return for the portfolio.
Explain erp systems : Explain ERP systems? How do they help the entire organization and so more comprehensive than CRM
Should the manager invest in the new equipment : The manager of a regional warehouse must decide on the number of loading docks to request for a new facility in order to minimize the sum of dock costs and driver-truck costs. The manager has learned that each driver-truck combination represents a co..

Reviews

Write a Review

Assembly Language Questions & Answers

  Create a assembly language subroutine

Create a assembly language subroutine MULSUM that takes an array named A containing n bytes of positive numbers, and fills two arrays, array B containing n words and array C containing n long words

  Write a function in linux assembly

Write a function in Linux assembly

  Analog measurements

Prepare an assembly program for the correctly measures the wind direction

  Design a simple digital clock

Design a simple digital clock

  Write an assembly program

Prepare an Assembly program that reads in a number of cents.

  Write an assembly language program

Write an assembly language program for encrypting alphabates of a string

  Greatest common divisor of integers-masm assembly language

Must be done in MASM assembly language: Greatest common divisor of two integers is largest integer which will evenly divide both integers. GCD algorithm involves integer division in a loop.

  Write assembly program-find right admission price to movie

Write the Assembly program to find correct admission price to movie. Price of admission to a movie is $7 for kids (under 12) and $9 for adults.

  Create simple 8-bit alu using add-subtract-shift functions

Create a simple 8-bit ALU. Requirements:The eight functions that you will implement are: add, subtract, and, or, shift left logical, less than, shift right logical.

  Write assembly program print binary representation-integers

Write the assembly program called hw6_ex1, stored in file hw6_ex1.asm. This program must prompt user to enter signed 32-bit integer. Program must print out binary representation of the integer.

  Allot op-codes and add microcode to microprogram

Allot op-codes and add microcode to microprogram of Mic-1 to implement following instructions which are then included with IJVM instruction set.

  Write mips assembly program to read two non-negative numbers

Write MIPS assembly program to repeatedly read two non-negative integers and print integer product and quotient without using multiplication and division instructions.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd